medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit fb79388bd90301e4587d5d4c03ebf2e00d95928d
parent 047d0ce624225b8f313542379fb762a80d935e65
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Thu Nov 10 20:47:02 +0200

Do ferror then fclose

Diffstat:
pp.cc | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pp.cc b/pp.cc @@ -102,8 +102,8 @@ static void write_compressed_file( const void * data, size_t len, const char * f FILE * file = fopen( path.c_str(), "wb" ); ASSERT( file != NULL ); fwrite( compressed, 1, compressed_len, file ); - fclose( file ); ASSERT( ferror( file ) == 0 ); + fclose( file ); // clean up delete[] compressed; @@ -170,8 +170,8 @@ int main( int argc, char ** argv ) { FILE * dims = fopen( ( dir + "/dims.txt" ).c_str(), "w" ); fprintf( dims, "%d %d", w, h ); - fclose( dims ); ASSERT( ferror( dims ) == 0 ); + fclose( dims ); float * horizons_memory = new float[ w * h ]; v3 * normals_memory = new v3[ w * h ];