From 8b71eb6d6065ec233b5b40adb9c6b10407c73fee Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 7 Aug 2021 17:08:44 +1000 Subject: Changes for Cppcheck 2.5. Shift of unsigned to avoid too much shifting and overflow warnings. Remove condition that was always true. Remove suppressions no longer needed. --- src/AutoComplete.cxx | 2 +- src/Decoration.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index 87077e92a..51eb0f0ee 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -272,7 +272,7 @@ void AutoComplete::Select(const char *word) { } } else if (cond < 0) { end = pivot - 1; - } else if (cond > 0) { + } else { // cond > 0 start = pivot + 1; } } diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 77b2894b2..4fd6b3b58 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -263,7 +263,7 @@ int DecorationList::AllOnFor(Sci::Position position) const noexcept { for (const std::unique_ptr> &deco : decorationList) { if (deco->rs.ValueAt(static_cast(position))) { if (deco->Indicator() < static_cast(Scintilla::IndicatorNumbers::Ime)) { - mask |= 1 << deco->Indicator(); + mask |= 1u << deco->Indicator(); } } } -- cgit v1.2.3