Loading src/TNL/Containers/Algorithms/ArrayIO.h +2 −2 Original line number Diff line number Diff line Loading @@ -71,14 +71,14 @@ class ArrayIO< Value, Device, Index, false > const Value* data, const Index elements ) { return file.write< Value, Device >( data, elements ); return file.save< Value, Value, Device >( data, elements ); } static bool load( File& file, Value* data, const Index elements ) { return file.read< Value, Device >( data, elements ); return file.load< Value, Value, Device >( data, elements ); } }; Loading src/TNL/Containers/Array_impl.h +3 −3 Original line number Diff line number Diff line Loading @@ -474,7 +474,7 @@ bool Array< Value, Device, Index >::save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.write( &this->size ) ) if( ! file.save( &this->size ) ) return false; if( this->size != 0 && ! Algorithms::ArrayIO< Value, Device, Index >::save( file, this->data, this->size ) ) { Loading @@ -495,7 +495,7 @@ load( File& file ) if( ! Object::load( file ) ) return false; Index _size; if( ! file.read( &_size ) ) if( ! file.load( &_size ) ) { std::cerr << "Unable to read the array size." << std::endl; return false; Loading Loading @@ -528,7 +528,7 @@ boundLoad( File& file ) if( ! Object::load( file ) ) return false; Index _size; if( ! file.read( &_size ) ) if( ! file.load( &_size ) ) return false; if( _size < 0 ) { Loading src/TNL/Containers/List_impl.h +6 −6 Original line number Diff line number Diff line Loading @@ -282,9 +282,9 @@ void List< T >::DeepEraseAll() template< typename T > bool List< T >::Save( File& file ) const { file.write( &size ); file.save( &size ); for( int i = 0; i < size; i ++ ) if( ! file. write( &operator[]( i ), 1 ) ) if( ! file. save( &operator[]( i ), 1 ) ) return false; return true; } Loading @@ -292,7 +292,7 @@ bool List< T >::Save( File& file ) const template< typename T > bool List< T >::DeepSave( File& file ) const { file. write( &size ); file.save( &size ); for( int i = 0; i < size; i ++ ) if( ! operator[]( i ). save( file ) ) return false; return true; Loading @@ -303,7 +303,7 @@ bool List< T >::Load( File& file ) { reset(); int _size; file. read( &_size, 1 ); file.load( &_size, 1 ); if( _size < 0 ) { std::cerr << "The curve size is negative." << std::endl; Loading @@ -312,7 +312,7 @@ bool List< T >::Load( File& file ) T t; for( int i = 0; i < _size; i ++ ) { if( ! file. read( &t, 1 ) ) if( ! file.load( &t, 1 ) ) return false; Append( t ); } Loading @@ -324,7 +324,7 @@ bool List< T >::DeepLoad( File& file ) { reset(); int _size; file. read( &_size ); file.load( &_size ); if( _size < 0 ) { std::cerr << "The list size is negative." << std::endl; Loading src/TNL/Containers/Multimaps/EllpackIndexMultimap_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -244,9 +244,9 @@ save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.write( &this->keysRange ) ) if( ! file.save( &this->keysRange ) ) return false; if( ! file.write( &this->maxValuesCount ) ) if( ! file.save( &this->maxValuesCount ) ) return false; if( ! this->values.save( file ) ) return false; Loading @@ -265,9 +265,9 @@ load( File& file ) { if( ! Object::load( file ) ) return false; if( ! file.read( &this->keysRange ) ) if( ! file.load( &this->keysRange ) ) return false; if( ! file.read( &this->maxValuesCount ) ) if( ! file.load( &this->maxValuesCount ) ) return false; if( ! this->values.load( file ) ) return false; Loading src/TNL/Containers/Multimaps/StaticEllpackIndexMultimap_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.write( &this->keysRange ) ) if( ! file.save( &this->keysRange ) ) return false; if( ! this->values.save( file ) ) return false; Loading @@ -221,7 +221,7 @@ load( File& file ) { if( ! Object::load( file ) ) return false; if( ! file.read( &this->keysRange ) ) if( ! file.load( &this->keysRange ) ) return false; if( ! this->values.load( file ) ) return false; Loading Loading
src/TNL/Containers/Algorithms/ArrayIO.h +2 −2 Original line number Diff line number Diff line Loading @@ -71,14 +71,14 @@ class ArrayIO< Value, Device, Index, false > const Value* data, const Index elements ) { return file.write< Value, Device >( data, elements ); return file.save< Value, Value, Device >( data, elements ); } static bool load( File& file, Value* data, const Index elements ) { return file.read< Value, Device >( data, elements ); return file.load< Value, Value, Device >( data, elements ); } }; Loading
src/TNL/Containers/Array_impl.h +3 −3 Original line number Diff line number Diff line Loading @@ -474,7 +474,7 @@ bool Array< Value, Device, Index >::save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.write( &this->size ) ) if( ! file.save( &this->size ) ) return false; if( this->size != 0 && ! Algorithms::ArrayIO< Value, Device, Index >::save( file, this->data, this->size ) ) { Loading @@ -495,7 +495,7 @@ load( File& file ) if( ! Object::load( file ) ) return false; Index _size; if( ! file.read( &_size ) ) if( ! file.load( &_size ) ) { std::cerr << "Unable to read the array size." << std::endl; return false; Loading Loading @@ -528,7 +528,7 @@ boundLoad( File& file ) if( ! Object::load( file ) ) return false; Index _size; if( ! file.read( &_size ) ) if( ! file.load( &_size ) ) return false; if( _size < 0 ) { Loading
src/TNL/Containers/List_impl.h +6 −6 Original line number Diff line number Diff line Loading @@ -282,9 +282,9 @@ void List< T >::DeepEraseAll() template< typename T > bool List< T >::Save( File& file ) const { file.write( &size ); file.save( &size ); for( int i = 0; i < size; i ++ ) if( ! file. write( &operator[]( i ), 1 ) ) if( ! file. save( &operator[]( i ), 1 ) ) return false; return true; } Loading @@ -292,7 +292,7 @@ bool List< T >::Save( File& file ) const template< typename T > bool List< T >::DeepSave( File& file ) const { file. write( &size ); file.save( &size ); for( int i = 0; i < size; i ++ ) if( ! operator[]( i ). save( file ) ) return false; return true; Loading @@ -303,7 +303,7 @@ bool List< T >::Load( File& file ) { reset(); int _size; file. read( &_size, 1 ); file.load( &_size, 1 ); if( _size < 0 ) { std::cerr << "The curve size is negative." << std::endl; Loading @@ -312,7 +312,7 @@ bool List< T >::Load( File& file ) T t; for( int i = 0; i < _size; i ++ ) { if( ! file. read( &t, 1 ) ) if( ! file.load( &t, 1 ) ) return false; Append( t ); } Loading @@ -324,7 +324,7 @@ bool List< T >::DeepLoad( File& file ) { reset(); int _size; file. read( &_size ); file.load( &_size ); if( _size < 0 ) { std::cerr << "The list size is negative." << std::endl; Loading
src/TNL/Containers/Multimaps/EllpackIndexMultimap_impl.h +4 −4 Original line number Diff line number Diff line Loading @@ -244,9 +244,9 @@ save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.write( &this->keysRange ) ) if( ! file.save( &this->keysRange ) ) return false; if( ! file.write( &this->maxValuesCount ) ) if( ! file.save( &this->maxValuesCount ) ) return false; if( ! this->values.save( file ) ) return false; Loading @@ -265,9 +265,9 @@ load( File& file ) { if( ! Object::load( file ) ) return false; if( ! file.read( &this->keysRange ) ) if( ! file.load( &this->keysRange ) ) return false; if( ! file.read( &this->maxValuesCount ) ) if( ! file.load( &this->maxValuesCount ) ) return false; if( ! this->values.load( file ) ) return false; Loading
src/TNL/Containers/Multimaps/StaticEllpackIndexMultimap_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ save( File& file ) const { if( ! Object::save( file ) ) return false; if( ! file.write( &this->keysRange ) ) if( ! file.save( &this->keysRange ) ) return false; if( ! this->values.save( file ) ) return false; Loading @@ -221,7 +221,7 @@ load( File& file ) { if( ! Object::load( file ) ) return false; if( ! file.read( &this->keysRange ) ) if( ! file.load( &this->keysRange ) ) return false; if( ! this->values.load( file ) ) return false; Loading