Removed unnecessary loops for debug output in CacheStrapper::loadList without debug enabled.

Changed parameter of RsDirUtil::cleanupDirectory from "std::list<std::string> keepFiles" to "const std::list<std::string> &keepFiles".

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3925 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-12-21 13:30:45 +00:00
parent 5bc8e68059
commit ab42691a31
3 changed files with 11 additions and 10 deletions

View file

@ -914,7 +914,10 @@ bool CacheStrapper::loadList(std::list<RsItem *>& load)
/* assemble a list of dirs to clean (union of cache dirs) */
std::list<std::string> cacheDirs;
std::list<std::string>::iterator dit, fit;
std::list<std::string>::iterator dit;
#ifdef CS_DEBUG
std::list<std::string>::iterator fit;
#endif
std::map<uint16_t, CachePair>::iterator cit;
for(cit = caches.begin(); cit != caches.end(); cit++)
{
@ -936,18 +939,16 @@ bool CacheStrapper::loadList(std::list<RsItem *>& load)
std::cerr << "CacheStrapper::loadList() Files To Save:" << std::endl;
#endif
#ifdef CS_DEBUG
for(sit = saveFiles.begin(); sit != saveFiles.end(); sit++)
{
#ifdef CS_DEBUG
std::cerr << "CacheStrapper::loadList() Files To Save in dir: <" << sit->first << ">" << std::endl;
#endif
for(fit = (sit->second).begin(); fit != (sit->second).end(); fit++)
{
#ifdef CS_DEBUG
std::cerr << "\tFile: " << *fit << std::endl;
#endif
}
}
#endif
std::list<std::string> emptyList;
for(dit = cacheDirs.begin(); dit != cacheDirs.end(); dit++)
@ -958,12 +959,12 @@ bool CacheStrapper::loadList(std::list<RsItem *>& load)
sit = saveFiles.find(*dit);
if (sit != saveFiles.end())
{
#ifdef CS_DEBUG
for(fit = (sit->second).begin(); fit != (sit->second).end(); fit++)
{
#ifdef CS_DEBUG
std::cerr << "CacheStrapper::loadList() Keeping File: " << *fit << std::endl;
#endif
}
#endif
RsDirUtil::cleanupDirectory(*dit, sit->second);
}
else