From 7d2f6bd5280613538c4beafac26a39348992d103 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 13 Aug 2022 18:12:55 +1000 Subject: Reduce warnings with noexcept, fewer casts, and other minor changes. --- src/PositionCache.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/PositionCache.cxx') 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(chars), static_cast(lineRange.end - nextBreak)); + charWidth = UTF8DrawBytes(chars, lineRange.end - nextBreak); } else { charWidth = pdoc->DBCSDrawBytes(std::string_view(chars, lineRange.end - nextBreak)); } -- cgit v1.2.3