Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-09-29 20:23:06 +0300
committerHarald Eilertsen <haraldei@anduin.net>2020-09-29 20:32:39 +0300
commit7721da25e553d6a65600d0fa6fab1bee32d7d308 (patch)
tree10b9a353c48046d515aa00f5edc6a1ff06e0ce78 /src/gui/folder.cpp
parent061ef027ff89641bcdecf4bc559c38089b33a62b (diff)
Replace find_if with none_of where appropriate.
We're not interested in any found element in these cases, just to check that none of the elements matches. Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
Diffstat (limited to 'src/gui/folder.cpp')
-rw-r--r--src/gui/folder.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index b4bfab3e6..b047d7f85 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -529,11 +529,10 @@ void Folder::saveToSettings() const
// where two folders for different accounts point at the same
// local folders.
const auto folderMap = FolderMan::instance()->map();
- const auto it = std::find_if(folderMap.cbegin(), folderMap.cend(), [this](const auto *other) {
+ const auto oneAccountOnly = std::none_of(folderMap.cbegin(), folderMap.cend(), [this](const auto *other) {
return other != this && other->cleanPath() == this->cleanPath();
});
- bool oneAccountOnly = it == folderMap.cend();
bool compatible = _saveBackwardsCompatible || oneAccountOnly;
if (compatible) {