summaryrefslogtreecommitdiff
path: root/FreeFileSync/Source/afs/native.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-10-03 01:04:14 +0000
committerB Stack <bgstack15@gmail.com>2020-10-03 01:04:14 +0000
commit0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c (patch)
treed8a89392817379e3036c42eedebf33d4fb372dfd /FreeFileSync/Source/afs/native.cpp
parentMerge branch '11.1' into 'master' (diff)
parentadd upstream 11.2 (diff)
downloadFreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.tar.gz
FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.tar.bz2
FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.zip
Merge branch '11.2' into 'master'11.2
add upstream 11.2 See merge request opensource-tracking/FreeFileSync!26
Diffstat (limited to 'FreeFileSync/Source/afs/native.cpp')
-rw-r--r--FreeFileSync/Source/afs/native.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/FreeFileSync/Source/afs/native.cpp b/FreeFileSync/Source/afs/native.cpp
index 7c2877ae..4bcaf2a7 100644
--- a/FreeFileSync/Source/afs/native.cpp
+++ b/FreeFileSync/Source/afs/native.cpp
@@ -382,11 +382,9 @@ private:
bool isNullFileSystem() const override { return rootPath_.empty(); }
- int compareDeviceSameAfsType(const AbstractFileSystem& afsRhs) const override
+ std::weak_ordering compareDeviceSameAfsType(const AbstractFileSystem& afsRhs) const override
{
- const Zstring& rootPathRhs = static_cast<const NativeFileSystem&>(afsRhs).rootPath_;
-
- return compareNativePath(rootPath_, rootPathRhs);
+ return compareNativePath(rootPath_, static_cast<const NativeFileSystem&>(afsRhs).rootPath_);
}
//----------------------------------------------------------------------------------------------------------------
@@ -580,7 +578,7 @@ private:
{
//perf test: detecting different volumes by path is ~30 times faster than having ::MoveFileEx() fail with ERROR_NOT_SAME_DEVICE (6µs vs 190µs)
//=> maybe we can even save some actual I/O in some cases?
- if (compareDeviceSameAfsType(pathTo.afsDevice.ref()) != 0)
+ if (std::is_neq(compareDeviceSameAfsType(pathTo.afsDevice.ref())))
throw ErrorMoveUnsupported(replaceCpy(replaceCpy(_("Cannot move file %x to %y."),
L"%x", L'\n' + fmtPath(getDisplayPath(pathFrom))),
L"%y", L'\n' + fmtPath(AFS::getDisplayPath(pathTo))),
bgstack15