summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-05-05 08:08:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-05-05 10:36:38 +0200
commitf614e082055dd3cad9885d6e1968d71f1e1b5a05 (patch)
treeba868d062caed84d00736904e9e392c0d8e02688 /include
parent9c6b7283e366788c629b237cb2a3045ce926fed6 (diff)
Fix typo in assert
I accidentally broke this in fa0c012d6c06e9a92093dacf997fe3151272648e "Provide std::u16string_view based o3tl::iterateCodePoints" when moving the body of code from rtl_uString_iterateCodePoints to here and then adapting it from sal_Int32- base OUString to std::size_t-based std::u16string_view. Change-Id: I5bd97413ac8c8482f409ad5be3797fef47191d33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151409 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/o3tl/string_view.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx
index 2609a32efe35..b5b64d5991dd 100644
--- a/include/o3tl/string_view.hxx
+++ b/include/o3tl/string_view.hxx
@@ -527,7 +527,7 @@ inline sal_uInt32 iterateCodePoints(std::u16string_view string, std::size_t* ind
}
while (incrementCodePoints < 0)
{
- assert(n >= 0);
+ assert(n > 0);
cu = string[--n];
if (rtl::isLowSurrogate(cu) && n != 0 && rtl::isHighSurrogate(string[n - 1]))
{