FILE * const fp = fileReader.GetFile();
if ( NULL != fp )
{
- fseek( fp, 0, SEEK_SET );
- fileData.globalMap = reinterpret_cast<GifByteType*>( malloc(sizeof( GifByteType ) * blobSize ) );
- fileData.length = fread( fileData.globalMap, sizeof( GifByteType ), blobSize, fp);
- fileInfo.map = fileData.globalMap;
+ if( ( ! fseek( fp, 0, SEEK_SET ) ) )
+ {
+ fileData.globalMap = reinterpret_cast<GifByteType*>( malloc(sizeof( GifByteType ) * blobSize ) );
+ fileData.length = fread( fileData.globalMap, sizeof( GifByteType ), blobSize, fp);
+ fileInfo.map = fileData.globalMap;
+ }
+ else
+ {
+ DALI_LOG_ERROR( "Error seeking within file\n" );
+ }
+ }
+ else
+ {
+ DALI_LOG_ERROR( "Error reading file\n" );
}
}
}
ReadHeader( loaderInfo, imageProperties, &error );
}
+ // Moveable but not copyable
+
+ Impl( const Impl& ) = delete;
+ Impl& operator=( const Impl& ) = delete;
+ Impl( Impl&& ) = default;
+ Impl& operator=( Impl&& ) = default;
+
~Impl()
{
if( loaderInfo.fileData.globalMap )
#define __DALI_TIZEN_PLATFORM_NETWORK_FILE_DOWNLOAD_H__
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
~CurlEnvironment();
+ // Moveable but not copyable
+
+ CurlEnvironment( const CurlEnvironment& ) = delete;
+ CurlEnvironment& operator=( const CurlEnvironment& ) = delete;
+ CurlEnvironment( CurlEnvironment&& ) = default;
+ CurlEnvironment& operator=( CurlEnvironment&& ) = default;
+
/**
* Locking function for libcurl with openssl
*/