summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorParis Oplopoios <paris.oplopoios@collabora.com>2023-06-12 02:11:44 +0300
committerParis Oplopoios <parisoplop@gmail.com>2023-06-12 13:11:07 +0200
commit81e815edbf5b4694789aa1d7b9e3ecde08b08b21 (patch)
treecc230423cb1fd0f1de078c18f9fd176c7320cd8d /editeng
parentcf0fe26f95b5435d65623165cf7ba381eaa0738a (diff)
tdf#153109 Use any_of instead of loop to check a range
Change-Id: Icf65288a7e53257008129b71e8d716b0b0c7f5fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152868 Tested-by: Paris Oplopoios <parisoplop@gmail.com> Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 318da6536df9..7959b9c2ba83 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -19,6 +19,7 @@
#include <memory>
#include <utility>
+#include <algorithm>
#include <string_view>
#include <sal/config.h>
@@ -175,10 +176,7 @@ static bool lcl_IsSymbolChar( CharClass const & rCC, const OUString& rTxt,
static bool lcl_IsInArr(std::u16string_view arr, const sal_uInt32 c)
{
- for (const auto c1 : arr)
- if (c1 == c)
- return true;
- return false;
+ return std::any_of(arr.begin(), arr.end(), [c](const auto c1) { return c1 == c; });
}
SvxAutoCorrDoc::~SvxAutoCorrDoc()