From cf40d63bd02d974c42c6f0512be27d504015400c Mon Sep 17 00:00:00 2001 From: Carl Baldwin Date: Tue, 25 Oct 2005 21:03:42 -0600 Subject: [PATCH] Cleanup --- main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/main.cpp b/main.cpp index a551850..2323efe 100644 --- a/main.cpp +++ b/main.cpp @@ -29,20 +29,19 @@ template bool copy_until_full( I begin, I end, O out, INT &space ) { bool complete = true; - I i = begin; - while( 0 != space && i != end ) { - INT size = (*i)->getFileSize(); + while( 0 != space && begin != end ) { + INT size = (*begin)->getFileSize(); INT blocksize = blocks( size ) * bytes_in_block; if( blocksize <= space ) { space -= blocksize; - out = *i; + out = *begin; ++out; } else { // We missed a file that should be included so the backup is not complete complete = false; } - ++i; + ++begin; } return complete; } @@ -104,7 +103,7 @@ void sizes( ITER begin, const ITER &end, INT &numblocks, INT &numbytes ) { numbytes += filesize; numblocks += blocks( filesize ); - begin++; + ++begin; } } -- 2.34.1