summaryrefslogtreecommitdiff
path: root/FreeFileSync/Source/afs/native.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-10-02 14:42:30 -0400
committerB Stack <bgstack15@gmail.com>2020-10-02 14:42:30 -0400
commit8aaf029ab6046eb8cbe600a548d176c1418bd99a (patch)
treed8a89392817379e3036c42eedebf33d4fb372dfd /FreeFileSync/Source/afs/native.cpp
parentMerge branch '11.1' into 'master' (diff)
downloadFreeFileSync-8aaf029ab6046eb8cbe600a548d176c1418bd99a.tar.gz
FreeFileSync-8aaf029ab6046eb8cbe600a548d176c1418bd99a.tar.bz2
FreeFileSync-8aaf029ab6046eb8cbe600a548d176c1418bd99a.zip
add upstream 11.2
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