diff options
author | B Stack <bgstack15@gmail.com> | 2022-06-07 15:38:20 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2022-06-07 15:38:20 -0400 |
commit | 9ee86228fb287d93b79c83bd684614eb988cd8f2 (patch) | |
tree | bc52fa511ab8ec63a8ac24b537fed38e3af17016 /freefilesync/ffs_no_eraseif.patch | |
parent | Merge branch 'scite-bump' into 'master' (diff) | |
download | stackrpms-9ee86228fb287d93b79c83bd684614eb988cd8f2.tar.gz stackrpms-9ee86228fb287d93b79c83bd684614eb988cd8f2.tar.bz2 stackrpms-9ee86228fb287d93b79c83bd684614eb988cd8f2.zip |
ffs: major rewrite of spec for el8 and fc
Diffstat (limited to 'freefilesync/ffs_no_eraseif.patch')
-rw-r--r-- | freefilesync/ffs_no_eraseif.patch | 405 |
1 files changed, 0 insertions, 405 deletions
diff --git a/freefilesync/ffs_no_eraseif.patch b/freefilesync/ffs_no_eraseif.patch deleted file mode 100644 index 71239e4..0000000 --- a/freefilesync/ffs_no_eraseif.patch +++ /dev/null @@ -1,405 +0,0 @@ -Message: generated with roughly sed -i -r -e 's/std::erase_if/eraseIf/g' $( grep -l -riIE 'std::erase_if\(' ) -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 10.18-2/FreeFileSync/Source/afs/abstract_impl.h ---- 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 16:15:55.823668066 -0500 -+++ 10.18-2/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 17:57:30.555558350 -0500 -@@ -255,7 +255,7 @@ - pathLocks_.access([&](std::map<NativePath, std::weak_ptr<std::mutex>>& pathLocks) - { - //remove obsolete entries -- std::erase_if(pathLocks, [](const auto& v) { return !v.second.lock(); }); -+ zen::eraseIf(pathLocks, [](const auto& v) { return !v.second.lock(); }); - - //get or create mutex - std::weak_ptr<std::mutex>& weakPtr = pathLocks[nativePath]; -diff -Naur 10.25-0/FreeFileSync/Source/afs/gdrive.cpp 10.25-1/FreeFileSync/Source/afs/gdrive.cpp ---- 10.25-0/FreeFileSync/Source/afs/gdrive.cpp 2020-06-19 16:17:15.000000000 -0400 -+++ 10.25-1/FreeFileSync/Source/afs/gdrive.cpp 2020-06-20 20:54:52.438669026 -0400 -@@ -1930,7 +1930,7 @@ - if (auto it = itemDetails_.find(itemId); it != itemDetails_.end()) - { - GdriveItemDetails detailsNew = it->second; -- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); -+ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); - notifyItemUpdated(stateDelta, itemId, &detailsNew); - } - else //conflict!!! -@@ -1944,7 +1944,7 @@ - GdriveItemDetails detailsNew = it->second; - detailsNew.itemName = newName; - -- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); // -+ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); // - detailsNew.parentIds.push_back(parentIdTo); //not a duplicate - - notifyItemUpdated(stateDelta, itemId, &detailsNew); -@@ -2095,7 +2095,7 @@ - return; //=> avoid misleading changeLog_ entries after Google Drive sync!!! - - //update change logs (and clean up obsolete entries) -- std::erase_if(changeLog_, [&](std::weak_ptr<ItemIdDelta>& weakPtr) -+ eraseIf(changeLog_, [&](std::weak_ptr<ItemIdDelta>& weakPtr) - { - if (std::shared_ptr<ItemIdDelta> iid = weakPtr.lock()) - { -@@ -2116,15 +2116,15 @@ - - std::vector<std::string> parentIdsNew = details->parentIds; - std::vector<std::string> parentIdsRemoved = it->second.parentIds; -- std::erase_if(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); }); -- std::erase_if(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); }); -+ eraseIf(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); }); -+ eraseIf(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); }); - - for (const std::string& parentId : parentIdsNew) - folderContents_[parentId].childItems.push_back(it); //new insert => no need for duplicate check - - for (const std::string& parentId : parentIdsRemoved) - if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) -- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); -+ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); - //if all parents are removed, Google Drive will (recursively) delete the item => don't prematurely do this now: wait for change notifications! - //OR: item without parents located in "Shared with me", but referenced via Shortcut => don't remove!!! - -@@ -2144,7 +2144,7 @@ - { - for (const std::string& parentId : it->second.parentIds) //1. delete from parent folders - if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) -- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); -+ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); - - itemDetails_.erase(it); - } -@@ -2153,7 +2153,7 @@ - itP != folderContents_.end()) - { - for (auto itChild : itP->second.childItems) //2. delete as parent from child items (don't wait for change notifications of children) -- std::erase_if(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); -+ eraseIf(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); - folderContents_.erase(itP); - } - } -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/sftp.cpp 10.18-2/FreeFileSync/Source/afs/sftp.cpp ---- 10.18-1/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:54:23.078438037 -0500 -+++ 10.18-2/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:57:30.557558372 -0500 -@@ -946,7 +946,7 @@ - std::this_thread::yield(); - return; //don't hold lock for too long: delete only one session at a time, then yield... - } -- std::erase_if(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer -+ eraseIf(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer - done = true; - }); - } -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/algorithm.cpp 10.18-2/FreeFileSync/Source/base/algorithm.cpp ---- 10.18-1/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 16:15:55.832668168 -0500 -+++ 10.18-2/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 17:57:30.558558384 -0500 -@@ -1372,8 +1372,8 @@ - { - std::vector<const FileSystemObject*> itemSelectionLeft (rowsToCopyOnLeft .begin(), rowsToCopyOnLeft .end()); - std::vector<const FileSystemObject*> itemSelectionRight(rowsToCopyOnRight.begin(), rowsToCopyOnRight.end()); -- std::erase_if(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats! -- std::erase_if(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); // -+ eraseIf(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats! -+ eraseIf(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); // - - const int itemTotal = static_cast<int>(itemSelectionLeft.size() + itemSelectionRight.size()); - int64_t bytesTotal = 0; -@@ -1548,8 +1548,8 @@ - std::vector<FileSystemObject*> deleteLeft = rowsToDeleteOnLeft; - std::vector<FileSystemObject*> deleteRight = rowsToDeleteOnRight; - -- std::erase_if(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed? -- std::erase_if(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); //yes, for correct stats: -+ eraseIf(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed? -+ eraseIf(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); //yes, for correct stats: - - const int itemCount = static_cast<int>(deleteLeft.size() + deleteRight.size()); - callback.initNewPhase(itemCount, 0, ProcessPhase::none); //throw X -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/db_file.cpp 10.18-2/FreeFileSync/Source/base/db_file.cpp ---- 10.18-1/FreeFileSync/Source/base/db_file.cpp 2019-11-20 16:15:55.836668213 -0500 -+++ 10.18-2/FreeFileSync/Source/base/db_file.cpp 2019-11-20 17:57:30.559558395 -0500 -@@ -591,7 +591,7 @@ - } - - //delete removed items (= "in-sync") from database -- std::erase_if(dbFiles, [&](const InSyncFolder::FileList::value_type& v) -+ eraseIf(dbFiles, [&](const InSyncFolder::FileList::value_type& v) - { - if (contains(toPreserve, v.first)) - return false; -@@ -628,7 +628,7 @@ - } - - //delete removed items (= "in-sync") from database -- std::erase_if(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v) -+ eraseIf(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v) - { - if (contains(toPreserve, v.first)) - return false; -@@ -663,7 +663,7 @@ - } - - //delete removed items (= "in-sync") from database -- std::erase_if(dbFolders, [&](InSyncFolder::FolderList::value_type& v) -+ eraseIf(dbFolders, [&](InSyncFolder::FolderList::value_type& v) - { - if (auto it = toPreserve.find(v.first); it != toPreserve.end()) - { -@@ -687,10 +687,10 @@ - //delete all entries for removed folder (= "in-sync") from database - void dbSetEmptyState(InSyncFolder& dbFolder, const Zstring& parentRelPathPf) - { -- std::erase_if(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); -- std::erase_if(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); -+ eraseIf(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); -+ eraseIf(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); - -- std::erase_if(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v) -+ eraseIf(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v) - { - const Zstring& itemRelPath = parentRelPathPf + v.first; - -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 10.18-2/FreeFileSync/Source/base/dir_lock.cpp ---- 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 16:15:55.836668213 -0500 -+++ 10.18-2/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 17:57:30.559558395 -0500 -@@ -502,8 +502,8 @@ - - void tidyUp() //remove obsolete entries - { -- std::erase_if(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); -- std::erase_if(guidByPath_, [&](const auto& v) { return !contains(locksByGuid_, v.second); }); -+ eraseIf(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); -+ eraseIf(guidByPath_, [&](const auto& v) { return locksByGuid_.find(v.second) == locksByGuid_.end(); }); - } - - std::map<Zstring, UniqueId> guidByPath_; //lockFilePath |-> GUID; n:1; locks can be referenced by a lockFilePath or alternatively a GUID -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp ---- 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 16:15:55.820668033 -0500 -+++ 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 17:57:30.559558395 -0500 -@@ -155,7 +155,7 @@ - checkXmlMappingErrors(in, filePath); //throw FileError - //--------------------------------------------------------------------------------------- - -- std::erase_if(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); }); -+ eraseIf(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); }); - cfg.directories.assign(uniqueFolders.begin(), uniqueFolders.end()); - cfg.commandline = Zstr('"') + fff::getFreeFileSyncLauncherPath() + Zstr("\" \"") + filePath + Zstr('"'); - } -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.23-0/FreeFileSync/Source/RealTimeSync/monitor.cpp 10.23-1/FreeFileSync/Source/RealTimeSync/monitor.cpp ---- 10.23-0/FreeFileSync/Source/RealTimeSync/monitor.cpp 2020-04-21 08:03:55.508842092 -0400 -+++ 10.23-1/FreeFileSync/Source/RealTimeSync/monitor.cpp 2020-04-21 09:10:54.765302811 -0400 -@@ -152,7 +152,7 @@ - if (change.type == DirWatcher::ChangeType::baseFolderUnavailable) - return change; - -- std::erase_if(changes, [](const DirWatcher::Change& e) -+ eraseIf(changes, [](const DirWatcher::Change& e) - { - return - endsWith(e.itemPath, Zstr(".ffs_tmp")) || //sync.8ea2.ffs_tmp -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp ---- 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 16:15:55.822668055 -0500 -+++ 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 17:57:30.560558406 -0500 -@@ -247,7 +247,7 @@ - rts::AbortReason rts::runFolderMonitor(const XmlRealConfig& config, const wxString& jobname) - { - std::vector<Zstring> dirNamesNonFmt = config.directories; -- std::erase_if(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! -+ eraseIf(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! - - if (dirNamesNonFmt.empty()) - { -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp ---- 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 16:15:55.847668337 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 17:57:30.561558418 -0500 -@@ -113,7 +113,7 @@ - { - const std::set<Zstring, LessNativePath> pathsSorted(filePaths.begin(), filePaths.end()); - -- std::erase_if(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); }); -+ eraseIf(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); }); - - for (const Zstring& filePath : filePaths) - cfgList_.erase(filePath); -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/command_box.cpp 10.18-2/FreeFileSync/Source/ui/command_box.cpp ---- 10.18-1/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:54:14.861345102 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:57:30.561558418 -0500 -@@ -75,7 +75,7 @@ - equalNoCase(newCommand, cmd)) - return; - -- std::erase_if(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); }); -+ eraseIf(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); }); - - history_.insert(history_.begin(), newCommand); - -@@ -194,7 +194,7 @@ - //this->SetSelection(wxNOT_FOUND); - - //delete selected row -- std::erase_if(history_, [&](const Zstring& item) { return item == selValue; }); -+ eraseIf(history_, [&](const Zstring& item) { return item == selValue; }); - - SetString(pos, wxString()); //in contrast to Delete(), this one does not kill the drop-down list and gives a nice visual feedback! - //Delete(pos); -diff -Naur 10.25-0/FreeFileSync/Source/ui/file_view.cpp 10.25-1/FreeFileSync/Source/ui/file_view.cpp ---- 10.25-0/FreeFileSync/Source/ui/file_view.cpp 2020-06-19 16:17:15.000000000 -0400 -+++ 10.25-1/FreeFileSync/Source/ui/file_view.cpp 2020-06-20 20:55:25.978009894 -0400 -@@ -321,7 +321,7 @@ - void FileView::removeInvalidRows() - { - //remove rows that have been deleted meanwhile -- std::erase_if(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); -+ eraseIf(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); - - viewRef_ .clear(); - rowPositions_ .clear(); -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 10.18-2/FreeFileSync/Source/ui/folder_history_box.h ---- 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 16:15:55.849668360 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 17:57:30.562558429 -0500 -@@ -35,13 +35,13 @@ - const Zstring nameTmp = zen::trimCpy(folderPathPhrase); - - //insert new folder or put it to the front if already existing -- std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); }); -+ zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); }); - - folderPathPhrases_.insert(folderPathPhrases_.begin(), nameTmp); - truncate(); - } - -- void delItem(const Zstring& folderPathPhrase) { std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); } -+ void delItem(const Zstring& folderPathPhrase) { zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); } - - private: - void truncate() -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 10.18-2/FreeFileSync/Source/ui/log_panel.cpp ---- 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 16:15:55.852668394 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 17:57:30.562558429 -0500 -@@ -545,7 +545,7 @@ - if (auto prov = m_gridMessages->getDataProvider()) - { - std::vector<Grid::ColAttributes> colAttr = m_gridMessages->getColumnConfig(); -- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - if (!colAttr.empty()) - for (size_t row : m_gridMessages->getSelectedRows()) - { -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp ---- 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:54:16.135359512 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:57:30.564558452 -0500 -@@ -1240,7 +1240,7 @@ - if (auto prov = grid->getDataProvider()) - { - std::vector<Grid::ColAttributes> colAttr = grid->getColumnConfig(); -- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - if (!colAttr.empty()) - for (size_t row : grid->getSelectedRows()) - { -@@ -5372,9 +5372,9 @@ - auto colAttrCenter = m_gridMainC->getColumnConfig(); - auto colAttrRight = m_gridMainR->getColumnConfig(); - -- std::erase_if(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -- std::erase_if(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast<ColumnTypeCenter>(ca.type) == ColumnTypeCenter::CHECKBOX; }); -- std::erase_if(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast<ColumnTypeCenter>(ca.type) == ColumnTypeCenter::CHECKBOX; }); -+ eraseIf(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - - if (provLeft && provCenter && provRight) - { -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 10.18-2/FreeFileSync/Source/ui/search_grid.cpp ---- 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 16:15:55.855668428 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 17:57:30.564558452 -0500 -@@ -69,7 +69,7 @@ - if (auto prov = grid.getDataProvider()) - { - std::vector<Grid::ColAttributes> colAttr = grid.getColumnConfig(); -- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); -+ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); - if (!colAttr.empty()) - { - const MatchFound<respectCase> matchFound(searchString); -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp ---- 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 16:15:55.858668462 -0500 -+++ 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 17:57:30.565558463 -0500 -@@ -601,7 +601,7 @@ - folderCmp_ = newData; - - //remove truly empty folder pairs as early as this: we want to distinguish single/multiple folder pair cases by looking at "folderCmp" -- std::erase_if(folderCmp_, [](const std::shared_ptr<BaseFolderPair>& baseObj) -+ eraseIf(folderCmp_, [](const std::shared_ptr<BaseFolderPair>& baseObj) - { - return AFS::isNullPath(baseObj->getAbstractPath< LEFT_SIDE>()) && - AFS::isNullPath(baseObj->getAbstractPath<RIGHT_SIDE>()); -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/wx+/async_task.h 10.18-2/wx+/async_task.h ---- 10.18-1/wx+/async_task.h 2019-11-20 16:15:55.860668484 -0500 -+++ 10.18-2/wx+/async_task.h 2019-11-20 17:57:30.565558463 -0500 -@@ -85,7 +85,7 @@ - - std::vector<std::unique_ptr<Task>> readyTasks; //Reentrancy; access to AsyncTasks::add is not protected! => evaluate outside eraseIf - -- std::erase_if(tasks_, [&](std::unique_ptr<Task>& task) -+ eraseIf(tasks_, [&](std::unique_ptr<Task>& task) - { - if (task->resultReady()) - { -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/zen/stl_tools.h 10.18-2/zen/stl_tools.h ---- 10.18-1/zen/stl_tools.h 2019-11-20 16:15:55.875668653 -0500 -+++ 10.18-2/zen/stl_tools.h 2019-11-20 17:58:20.801126674 -0500 -@@ -20,6 +20,16 @@ - //enhancements for <algorithm> - namespace zen - { -+//erase selected elements from any container: -+template <class T, class Alloc, class Predicate> -+void eraseIf(std::vector<T, Alloc>& v, Predicate p); -+ -+template <class T, class LessType, class Alloc, class Predicate> -+void eraseIf(std::set<T, LessType, Alloc>& s, Predicate p); -+ -+template <class KeyType, class ValueType, class LessType, class Alloc, class Predicate> -+void eraseIf(std::map<KeyType, ValueType, LessType, Alloc>& m, Predicate p); -+ - //append STL containers - template <class T, class Alloc, class C> - void append(std::vector<T, Alloc>& v, const C& c); -@@ -115,6 +125,36 @@ - - - //######################## implementation ######################## -+ -+template <class T, class Alloc, class Predicate> inline -+void eraseIf(std::vector<T, Alloc>& v, Predicate p) -+{ -+ v.erase(std::remove_if(v.begin(), v.end(), p), v.end()); -+} -+ -+ -+namespace impl -+{ -+template <class S, class Predicate> inline -+void setOrMapEraseIf(S& s, Predicate p) -+{ -+ for (auto it = s.begin(); it != s.end();) -+ if (p(*it)) -+ s.erase(it++); -+ else -+ ++it; -+} -+} -+ -+ -+template <class T, class LessType, class Alloc, class Predicate> inline -+void eraseIf(std::set<T, LessType, Alloc>& s, Predicate p) { impl::setOrMapEraseIf(s, p); } //don't make this any more generic! e.g. must not compile for std::vector!!! -+ -+ -+template <class KeyType, class ValueType, class LessType, class Alloc, class Predicate> inline -+void eraseIf(std::map<KeyType, ValueType, LessType, Alloc>& m, Predicate p) { impl::setOrMapEraseIf(m, p); } -+ -+ - template <class T, class Alloc, class C> inline - void append(std::vector<T, Alloc>& v, const C& c) { v.insert(v.end(), c.begin(), c.end()); } - |