[Box Backup-dev] COMMIT r445 - box/chris/win32/vc2005-compile-fixes/bin/bbackupquery
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sun, 12 Feb 2006 15:04:40 +0000 (GMT)
Author: chris
Date: 2006-02-12 15:04:37 +0000 (Sun, 12 Feb 2006)
New Revision: 445
Modified:
box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Use const_iterator on all platforms except MSVC, which doesn't like calling
erase() with a const_iterator as a parameter
Modified: box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp 2006-02-12 14:41:31 UTC (rev 444)
+++ box/chris/win32/vc2005-compile-fixes/bin/bbackupquery/BackupQueries.cpp 2006-02-12 15:04:37 UTC (rev 445)
@@ -1369,12 +1369,18 @@
storeDirs.insert(std::pair<std::string, BackupStoreDirectory::Entry *>(name.GetClearFilename(), storeDirEn));
}
}
+
+#ifdef _MSC_VER
+ typedef std::set<std::string>::iterator string_set_iter_t;
+#else
+ typedef std::set<std::string>::const_iterator string_set_iter_t;
+#endif
// Now compare files.
for(std::set<std::pair<std::string, BackupStoreDirectory::Entry *> >::const_iterator i = storeFiles.begin(); i != storeFiles.end(); ++i)
{
// Does the file exist locally?
- std::set<std::string>::iterator local(localFiles.find(i->first));
+ string_set_iter_t local(localFiles.find(i->first));
if(local == localFiles.end())
{
// Not found -- report
@@ -1552,7 +1558,7 @@
}
// Report any files which exist on the locally, but not on the store
- for(std::set<std::string>::iterator i = localFiles.begin(); i != localFiles.end(); ++i)
+ for(string_set_iter_t i = localFiles.begin(); i != localFiles.end(); ++i)
{
std::string localFileName(rLocalDir +
DIRECTORY_SEPARATOR + *i);
@@ -1594,7 +1600,7 @@
for(std::set<std::pair<std::string, BackupStoreDirectory::Entry *> >::const_iterator i = storeDirs.begin(); i != storeDirs.end(); ++i)
{
// Does the directory exist locally?
- std::set<std::string>::iterator local(localDirs.find(i->first));
+ string_set_iter_t local(localDirs.find(i->first));
if(local == localDirs.end())
{
// Not found -- report