"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "8a16e12f3a7f10d124b26aeb7975cd2bf4a81695"
Commit a9d554a4 authored by Davis King's avatar Davis King
Browse files

minor cleanup

parent ff3023f2
...@@ -46,6 +46,10 @@ namespace dlib ...@@ -46,6 +46,10 @@ namespace dlib
{ {
} }
// no copying this object.
FileInfo(const FileInfo&) = delete;
FileInfo& operator=(const FileInfo&) = delete;
~FileInfo() ~FileInfo()
{ {
if ( fp_ != nullptr ) fclose( fp_ ); if ( fp_ != nullptr ) fclose( fp_ );
...@@ -174,7 +178,7 @@ namespace dlib ...@@ -174,7 +178,7 @@ namespace dlib
void png_loader::read_image( std::unique_ptr<FileInfo> file_info ) void png_loader::read_image( std::unique_ptr<FileInfo> file_info )
{ {
if ( !file_info ) throw image_load_error(std::string("png_loader: invalid file_info, it is NULL")); DLIB_CASSERT(file_info);
ld_.reset(new LibpngData); ld_.reset(new LibpngData);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment