Loading src/TNL/Object_impl.h +1 −5 Original line number Diff line number Diff line Loading @@ -103,11 +103,7 @@ inline bool Object :: boundLoad( const String& fileName ) inline bool getObjectType( File& file, String& type ) { char mn[ 10 ]; if( ! file.read( mn, strlen( magic_number ) ) ) { std::cerr << "Unable to read file " << file.getFileName() << " ... " << std::endl; return false; } file.read( mn, strlen( magic_number ) ); if( strncmp( mn, magic_number, 5 ) != 0 ) { std::cout << "Not a TNL file (wrong magic number)." << std::endl; Loading src/Tools/tnl-diff.h +7 −3 Original line number Diff line number Diff line Loading @@ -623,9 +623,13 @@ bool processFiles( const Config::ParameterContainer& parameters ) } String objectType; if( ! getObjectType( inputFiles[ 0 ], objectType ) ) { std::cerr << "unknown object ... SKIPPING!" << std::endl; return false; try { getObjectType( inputFiles[ 0 ], objectType ); } catch( std::ios_base::failure exception ) { std::cerr << "Cannot open file " << inputFiles[ 0 ] << std::endl; } if( verbose ) Loading Loading
src/TNL/Object_impl.h +1 −5 Original line number Diff line number Diff line Loading @@ -103,11 +103,7 @@ inline bool Object :: boundLoad( const String& fileName ) inline bool getObjectType( File& file, String& type ) { char mn[ 10 ]; if( ! file.read( mn, strlen( magic_number ) ) ) { std::cerr << "Unable to read file " << file.getFileName() << " ... " << std::endl; return false; } file.read( mn, strlen( magic_number ) ); if( strncmp( mn, magic_number, 5 ) != 0 ) { std::cout << "Not a TNL file (wrong magic number)." << std::endl; Loading
src/Tools/tnl-diff.h +7 −3 Original line number Diff line number Diff line Loading @@ -623,9 +623,13 @@ bool processFiles( const Config::ParameterContainer& parameters ) } String objectType; if( ! getObjectType( inputFiles[ 0 ], objectType ) ) { std::cerr << "unknown object ... SKIPPING!" << std::endl; return false; try { getObjectType( inputFiles[ 0 ], objectType ); } catch( std::ios_base::failure exception ) { std::cerr << "Cannot open file " << inputFiles[ 0 ] << std::endl; } if( verbose ) Loading