minor cleanup

This commit is contained in:
Davis King 2020-08-05 08:13:58 -04:00
parent ff3023f266
commit a9d554a4ac

View File

@ -46,6 +46,10 @@ namespace dlib
{
}
// no copying this object.
FileInfo(const FileInfo&) = delete;
FileInfo& operator=(const FileInfo&) = delete;
~FileInfo()
{
if ( fp_ != nullptr ) fclose( fp_ );
@ -174,7 +178,7 @@ namespace dlib
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);