diff options
author | Neil <nyamatongwe@gmail.com> | 2024-02-28 11:44:50 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2024-02-28 11:44:50 +1100 |
commit | ce9ec5366ab200193140bbd060b948f62a10286b (patch) | |
tree | 99043aca968b7a9dd7776bcacf28f626593aed5d /src/Document.cxx | |
parent | d021884ab62bb339427cb01bebb2660f47417019 (diff) | |
download | scintilla-mirror-ce9ec5366ab200193140bbd060b948f62a10286b.tar.gz |
Add variant of UTF8Classify that takes a char* so that client code does not have
to reinterpret_cast.
Make functions in header constexpr.
Prefer .data() to &[] since safer.
Avoid else when not needed.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 5f77ec2de..df4e570d0 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2235,7 +2235,7 @@ Sci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, con for (int b = 1; b < widthCharBytes; b++) { bytes[b] = cbView.CharAt(posIndexDocument + b); } - widthChar = UTF8Classify(reinterpret_cast<const unsigned char *>(bytes), widthCharBytes) & UTF8MaskWidth; + widthChar = UTF8Classify(bytes, widthCharBytes) & UTF8MaskWidth; if (!indexSearch) { // First character widthFirstCharacter = widthChar; } |