diff options
author | Neil <nyamatongwe@gmail.com> | 2022-08-13 18:12:55 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-08-13 18:12:55 +1000 |
commit | 7d2f6bd5280613538c4beafac26a39348992d103 (patch) | |
tree | 3da3b4dc503778ef6ce45da0477bcfdafd127160 /src/PositionCache.cxx | |
parent | 059594717cb36423733a0fbdee316f436d2e49a0 (diff) | |
download | scintilla-mirror-7d2f6bd5280613538c4beafac26a39348992d103.tar.gz |
Reduce warnings with noexcept, fewer casts, and other minor changes.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r-- | src/PositionCache.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index f1298ddd4..0104b8660 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -385,7 +385,7 @@ constexpr bool GraphicASCII(char ch) noexcept { return ch >= ' ' && ch <= '~'; } -bool AllGraphicASCII(std::string_view text) noexcept { +bool AllGraphicASCII(std::string_view text) { return std::all_of(text.cbegin(), text.cend(), GraphicASCII); } @@ -742,7 +742,7 @@ TextSegment BreakFinder::Next() { const unsigned char ch = chars[0]; if (!UTF8IsAscii(ch) && encodingFamily != EncodingFamily::eightBit) { if (encodingFamily == EncodingFamily::unicode) { - charWidth = UTF8DrawBytes(reinterpret_cast<const unsigned char *>(chars), static_cast<int>(lineRange.end - nextBreak)); + charWidth = UTF8DrawBytes(chars, lineRange.end - nextBreak); } else { charWidth = pdoc->DBCSDrawBytes(std::string_view(chars, lineRange.end - nextBreak)); } |