svx/source/styles/ColorSets.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit f8224b9625c26a7c92a289573765d4a201678d68 Author: Simon Chenery <[email protected]> AuthorDate: Thu Oct 9 22:13:08 2025 +0200 Commit: David Gilbert <[email protected]> CommitDate: Fri Nov 21 17:19:25 2025 +0100 tdf#158237 Use C++20 contains() instead of find(), end() in ColorSets.cxx Change-Id: I4db55868fc12994e59efd368eb68b57fee0c0bf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192137 Tested-by: Jenkins Reviewed-by: Devansh Varshney <[email protected]> Reviewed-by: David Gilbert <[email protected]> diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx index 9d6ae570bc33..61e2014a0d55 100644 --- a/svx/source/styles/ColorSets.cxx +++ b/svx/source/styles/ColorSets.cxx @@ -180,8 +180,7 @@ namespace OUString findUniqueName(std::unordered_set<OUString> const& rNames, OUString const& rNewName) { - auto iterator = rNames.find(rNewName); - if (iterator == rNames.cend()) + if (!rNames.contains(rNewName)) return rNewName; int i = 1; @@ -190,8 +189,7 @@ OUString findUniqueName(std::unordered_set<OUString> const& rNames, OUString con { aName = rNewName + "_" + OUString::number(i); i++; - iterator = rNames.find(aName); - } while (iterator != rNames.cend()); + } while (rNames.contains(aName)); return aName; }
