From: Carl Baldwin Date: Wed, 26 Oct 2005 03:03:42 +0000 (-0600) Subject: Cleanup X-Git-Tag: release-0.4~59 X-Git-Url: http://git.pippins.net/embedvideo/.git/%7Blink_hometeaching%7D?a=commitdiff_plain;h=cf40d63bd02d974c42c6f0512be27d504015400c;p=backups%2F.git Cleanup --- 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; } }