File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -479,8 +479,8 @@ void OCC::SyncEngine::slotItemDiscovered(const OCC::SyncFileItemPtr &item)
479479 _needsUpdate = true ;
480480
481481 // Insert sorted
482- auto it = std::lower_bound ( _syncItems. begin (), _syncItems. end (), item ); // the _syncItems is sorted
483- _syncItems.insert ( it, item );
482+ const auto it = std::ranges:: lower_bound (_syncItems, item); // the _syncItems is sorted
483+ _syncItems.insert (it, item);
484484
485485 slotNewItem (item);
486486
@@ -1157,13 +1157,9 @@ bool SyncEngine::shouldRestartSync() const
11571157 return false ;
11581158 }
11591159
1160- for (const auto &syncItem : _syncItems) {
1161- // If there's at least one remove instruction to be propagated to the remote: bail out, we might have lost a local rename.
1162- if (syncItem->_instruction == CSYNC_INSTRUCTION_REMOVE && syncItem->_direction == SyncFileItem::Up) {
1163- return true ;
1164- }
1165- }
1166- return false ;
1160+ return std::ranges::any_of (_syncItems, [](const auto &syncItem) {
1161+ return syncItem->_instruction == CSYNC_INSTRUCTION_REMOVE && syncItem->_direction == SyncFileItem::Up;
1162+ });
11671163}
11681164
11691165int SyncEngine::countDeletedFiles () const
You can’t perform that action at this time.
0 commit comments