diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-18 13:15:01 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-18 18:38:36 +0100 |
commit | 4bbd9853afde9456c1c5bc16eca3b775e53a01fe (patch) | |
tree | a93906af4375f21d212096368342ba323c930e4a /fpicker | |
parent | 6e587b15efb824c97e103d86d360c590918263c4 (diff) |
c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 4)
Change-Id: I6af5501e3fde07024dcc74f00c8fd69bd369d8d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159613
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/fileview.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx index ebc3ee3b8b18..1fa1c4dafcd3 100644 --- a/fpicker/source/office/fileview.cxx +++ b/fpicker/source/office/fileview.cxx @@ -1304,7 +1304,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( std::u16string_view rFilter ) // do the filtering - maContent.erase(std::remove_if(maContent.begin(), maContent.end(), + std::erase_if(maContent, [&aFilters](const std::unique_ptr<SortingData_Impl>& rxContent) { if (rxContent->mbIsFolder) return false; @@ -1312,8 +1312,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( std::u16string_view rFilter ) // 91872 - 11.09.2001 - frank.schoenheit@sun.com OUString sCompareString = rxContent->GetFileName(); // filter works on file name, not on title! return std::none_of(aFilters.begin(), aFilters.end(), FilterMatch(sCompareString)); - }), - maContent.end()); + }); } IMPL_LINK_NOARG(SvtFileView_Impl, ChangedHdl, weld::TreeView&, void) |