summaryrefslogtreecommitdiff
path: root/lib/cmp_filetime.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:29 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:29 +0200
commitb8f13e45be884dc12884ebe8f3dcd9eecb23a106 (patch)
tree22a6d8b96815d626061ff3e2d432c13078fca5c4 /lib/cmp_filetime.h
parent5.4 (diff)
downloadFreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.tar.gz
FreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.tar.bz2
FreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.zip
5.5
Diffstat (limited to 'lib/cmp_filetime.h')
-rw-r--r--lib/cmp_filetime.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/cmp_filetime.h b/lib/cmp_filetime.h
index afc97b9d..eb595ace 100644
--- a/lib/cmp_filetime.h
+++ b/lib/cmp_filetime.h
@@ -24,8 +24,6 @@ static const long oneYearFromNow = wxGetUTCTime() + 365 * 24 * 3600; //init at p
class CmpFileTime
{
public:
- CmpFileTime(size_t tolerance) : tolerance_(tolerance) {}
-
enum Result
{
TIME_EQUAL,
@@ -35,9 +33,9 @@ public:
TIME_RIGHT_INVALID
};
- Result getResult(const Int64& lhs, const Int64& rhs) const
+ static Result getResult(const Int64& lhs, const Int64& rhs, size_t tolerance)
{
- if (sameFileTime(lhs, rhs, tolerance_)) //last write time may differ by up to 2 seconds (NTFS vs FAT32)
+ if (sameFileTime(lhs, rhs, tolerance)) //last write time may differ by up to 2 seconds (NTFS vs FAT32)
return TIME_EQUAL;
//check for erroneous dates
@@ -53,9 +51,6 @@ public:
else
return TIME_LEFT_NEWER;
}
-
-private:
- const size_t tolerance_;
};
}
bgstack15