summaryrefslogtreecommitdiff
path: root/library/detect_renaming.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:10:11 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:10:11 +0200
commitc0cdb2ad99a1e2a6ade5ce76c91177a79258e669 (patch)
tree4701a015385d9a6a5a4ba99a8f1f5d400fff26b1 /library/detect_renaming.cpp
parent3.13 (diff)
downloadFreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.gz
FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.bz2
FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.zip
3.14
Diffstat (limited to 'library/detect_renaming.cpp')
-rw-r--r--library/detect_renaming.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/library/detect_renaming.cpp b/library/detect_renaming.cpp
index 3c491ae3..0e19451c 100644
--- a/library/detect_renaming.cpp
+++ b/library/detect_renaming.cpp
@@ -126,7 +126,7 @@ void FindDBAssoc::recurse(const DirContainer& leftSide, const DirContainer& righ
}
}
-//-----------------------------------------------------------------------------------------------
+ //-----------------------------------------------------------------------------------------------
for (DirContainer::SubDirList::const_iterator i = leftSide.getSubDirs().begin(); i != leftSide.getSubDirs().end(); ++i)
{
const DirContainer::SubDirList::const_iterator j = rightSide.getSubDirs().find(i->first);
@@ -172,35 +172,35 @@ private:
{
switch (fileObj.getSyncOperation()) //evaluate comparison result and sync direction
{
- case SO_CREATE_NEW_LEFT:
- if (!fileObj.getFileID<RIGHT_SIDE>().isNull()) //fileIdentifier may be NULL
- createLeft[FindDBAssoc::AssocKey(fileObj.getFileID<RIGHT_SIDE>(),
- fileObj.getLastWriteTime<RIGHT_SIDE>(),
- fileObj.getFileSize<RIGHT_SIDE>())] = &fileObj;
- break;
-
- case SO_CREATE_NEW_RIGHT:
- if (!fileObj.getFileID<LEFT_SIDE>().isNull()) //fileIdentifier may be NULL
- createRight.push_back(&fileObj);
- break;
-
- case SO_DELETE_LEFT:
- if (!fileObj.getFileID<LEFT_SIDE>().isNull()) //fileIdentifier may be NULL
- deleteLeft.push_back(&fileObj);
- break;
-
- case SO_DELETE_RIGHT:
- if (!fileObj.getFileID<RIGHT_SIDE>().isNull()) //fileIdentifier may be NULL
- deleteRight[FindDBAssoc::AssocKey(fileObj.getFileID<RIGHT_SIDE>(),
- fileObj.getLastWriteTime<RIGHT_SIDE>(),
- fileObj.getFileSize<RIGHT_SIDE>())] = &fileObj;
- break;
-
- case SO_OVERWRITE_RIGHT:
- case SO_OVERWRITE_LEFT:
- case SO_DO_NOTHING:
- case SO_UNRESOLVED_CONFLICT:
- break;
+ case SO_CREATE_NEW_LEFT:
+ if (!fileObj.getFileID<RIGHT_SIDE>().isNull()) //fileIdentifier may be NULL
+ createLeft[FindDBAssoc::AssocKey(fileObj.getFileID<RIGHT_SIDE>(),
+ fileObj.getLastWriteTime<RIGHT_SIDE>(),
+ fileObj.getFileSize<RIGHT_SIDE>())] = &fileObj;
+ break;
+
+ case SO_CREATE_NEW_RIGHT:
+ if (!fileObj.getFileID<LEFT_SIDE>().isNull()) //fileIdentifier may be NULL
+ createRight.push_back(&fileObj);
+ break;
+
+ case SO_DELETE_LEFT:
+ if (!fileObj.getFileID<LEFT_SIDE>().isNull()) //fileIdentifier may be NULL
+ deleteLeft.push_back(&fileObj);
+ break;
+
+ case SO_DELETE_RIGHT:
+ if (!fileObj.getFileID<RIGHT_SIDE>().isNull()) //fileIdentifier may be NULL
+ deleteRight[FindDBAssoc::AssocKey(fileObj.getFileID<RIGHT_SIDE>(),
+ fileObj.getLastWriteTime<RIGHT_SIDE>(),
+ fileObj.getFileSize<RIGHT_SIDE>())] = &fileObj;
+ break;
+
+ case SO_OVERWRITE_RIGHT:
+ case SO_OVERWRITE_LEFT:
+ case SO_DO_NOTHING:
+ case SO_UNRESOLVED_CONFLICT:
+ break;
}
}
@@ -208,11 +208,11 @@ private:
std::vector<FileMapping*> createRight; //pointer always bound!
std::vector<FileMapping*> deleteLeft; //
-// |
-// \|/
+ // |
+ // \|/
std::map<FindDBAssoc::AssocKey, Utility::FileID> assocDBLeftToRight;
-// |
-// \|/
+ // |
+ // \|/
std::map<FindDBAssoc::AssocKey, FileMapping*> deleteRight; //pointer always bound!
std::map<FindDBAssoc::AssocKey, FileMapping*> createLeft; //
@@ -225,8 +225,8 @@ void FindRenameCandidates::getRenameCandidates(
std::vector<std::pair<FileMapping*, FileMapping*> >& renameOnRight)
{
for (std::vector<FileMapping*>::const_iterator crRightIter = createRight.begin();
- crRightIter != createRight.end();
- ++crRightIter)
+ crRightIter != createRight.end();
+ ++crRightIter)
{
const FindDBAssoc::AssocKey assocDbKey((*crRightIter)->getFileID<LEFT_SIDE>(),
(*crRightIter)->getLastWriteTime<LEFT_SIDE>(),
@@ -239,8 +239,8 @@ void FindRenameCandidates::getRenameCandidates(
{
std::map<FindDBAssoc::AssocKey, FileMapping*>::const_iterator delRightIter =
deleteRight.find(FindDBAssoc::AssocKey(assocDBIter->second, //FileID of right side
- assocDbKey.lastWriteTimeRaw_,
- assocDbKey.fileSize_));
+ assocDbKey.lastWriteTimeRaw_,
+ assocDbKey.fileSize_));
if (delRightIter != deleteRight.end())
{
@@ -250,8 +250,8 @@ void FindRenameCandidates::getRenameCandidates(
}
//------------------------------------------------------------------------------------------------
for (std::vector<FileMapping*>::const_iterator delLeftIter = deleteLeft.begin();
- delLeftIter != deleteLeft.end();
- ++delLeftIter)
+ delLeftIter != deleteLeft.end();
+ ++delLeftIter)
{
const FindDBAssoc::AssocKey assocDbKey((*delLeftIter)->getFileID<LEFT_SIDE>(),
(*delLeftIter)->getLastWriteTime<LEFT_SIDE>(),
@@ -264,8 +264,8 @@ void FindRenameCandidates::getRenameCandidates(
{
std::map<FindDBAssoc::AssocKey, FileMapping*>::const_iterator createLeftIter =
createLeft.find(FindDBAssoc::AssocKey(assocDBIter->second, //FileID of right side
- assocDbKey.lastWriteTimeRaw_,
- assocDbKey.fileSize_));
+ assocDbKey.lastWriteTimeRaw_,
+ assocDbKey.fileSize_));
if (createLeftIter != createLeft.end())
{
bgstack15