diff options
author | Jose <jose@zeroc.com> | 2012-10-03 14:51:45 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-10-03 14:51:45 +0200 |
commit | 319a8a2f04aa3dec1eb41f9aa29690bf68bdcfbd (patch) | |
tree | 6cf6d939c3621633056403ff1d1106949a00b5f0 /cpp/src/IcePatch2Lib/ClientUtil.cpp | |
parent | Minor C++ fixes (diff) | |
download | ice-319a8a2f04aa3dec1eb41f9aa29690bf68bdcfbd.tar.bz2 ice-319a8a2f04aa3dec1eb41f9aa29690bf68bdcfbd.tar.xz ice-319a8a2f04aa3dec1eb41f9aa29690bf68bdcfbd.zip |
ICE-4824 - Fixed VC6 style loops
Diffstat (limited to 'cpp/src/IcePatch2Lib/ClientUtil.cpp')
-rwxr-xr-x | cpp/src/IcePatch2Lib/ClientUtil.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cpp/src/IcePatch2Lib/ClientUtil.cpp b/cpp/src/IcePatch2Lib/ClientUtil.cpp index 78aa0776d3e..3e829cc3867 100755 --- a/cpp/src/IcePatch2Lib/ClientUtil.cpp +++ b/cpp/src/IcePatch2Lib/ClientUtil.cpp @@ -450,10 +450,8 @@ IcePatch2::Patcher::patch(const string& d) { string dirWithSlash = simplify(dir + '/'); - FileInfoSeq::const_iterator p; - FileInfoSeq remove; - for(p = _removeFiles.begin(); p != _removeFiles.end(); ++p) + for(FileInfoSeq::const_iterator p = _removeFiles.begin(); p != _removeFiles.end(); ++p) { if(p->path == dir) { @@ -466,7 +464,7 @@ IcePatch2::Patcher::patch(const string& d) } FileInfoSeq update; - for(p = _updateFiles.begin(); p != _updateFiles.end(); ++p) + for(FileInfoSeq::const_iterator p = _updateFiles.begin(); p != _updateFiles.end(); ++p) { if(p->path == dir) { @@ -479,7 +477,7 @@ IcePatch2::Patcher::patch(const string& d) } FileInfoSeq updateFlag; - for(p = _updateFlags.begin(); p != _updateFlags.end(); ++p) + for(FileInfoSeq::const_iterator p = _updateFlags.begin(); p != _updateFlags.end(); ++p) { if(p->path == dir) { @@ -674,12 +672,10 @@ IcePatch2::Patcher::updateFiles(const FileInfoSeq& files) bool IcePatch2::Patcher::updateFilesInternal(const FileInfoSeq& files, const DecompressorPtr& decompressor) { - FileInfoSeq::const_iterator p; - Long total = 0; Long updated = 0; - for(p = files.begin(); p != files.end(); ++p) + for(FileInfoSeq::const_iterator p = files.begin(); p != files.end(); ++p) { if(p->size > 0) // Regular, non-empty file? { @@ -690,7 +686,7 @@ IcePatch2::Patcher::updateFilesInternal(const FileInfoSeq& files, const Decompre AsyncResultPtr curCB; AsyncResultPtr nxtCB; - for(p = files.begin(); p != files.end(); ++p) + for(FileInfoSeq::const_iterator p = files.begin(); p != files.end(); ++p) { if(p->size < 0) // Directory? { |