diff options
-rw-r--r-- | lexers/LexCPP.cxx | 2 | ||||
-rw-r--r-- | src/Decoration.cxx | 8 | ||||
-rw-r--r-- | src/PerLine.cxx | 4 | ||||
-rw-r--r-- | src/PositionCache.cxx | 2 | ||||
-rw-r--r-- | src/ViewStyle.cxx | 8 |
5 files changed, 12 insertions, 12 deletions
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index 09e5b1cb4..8ef4a1bfa 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -831,7 +831,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i ppDefineHistory.clear(); std::vector<PPDefinition>::iterator itInvalid = std::find_if(ppDefineHistory.begin(), ppDefineHistory.end(), - [lineCurrent](const PPDefinition &p) { return p.line >= lineCurrent; }); + [lineCurrent](const PPDefinition &p) noexcept { return p.line >= lineCurrent; }); if (itInvalid != ppDefineHistory.end()) { ppDefineHistory.erase(itInvalid, ppDefineHistory.end()); definitionsChanged = true; diff --git a/src/Decoration.cxx b/src/Decoration.cxx index abf15f7e6..39f0c62cc 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -149,7 +149,7 @@ Decoration<POS> *DecorationList<POS>::Create(int indicator, Sci::Position length typename std::vector<std::unique_ptr<Decoration<POS>>>::iterator it = std::lower_bound( decorationList.begin(), decorationList.end(), decoNew, - [](const std::unique_ptr<Decoration<POS>> &a, const std::unique_ptr<Decoration<POS>> &b) { + [](const std::unique_ptr<Decoration<POS>> &a, const std::unique_ptr<Decoration<POS>> &b) noexcept { return a->Indicator() < b->Indicator(); }); typename std::vector<std::unique_ptr<Decoration<POS>>>::iterator itAdded = @@ -163,7 +163,7 @@ Decoration<POS> *DecorationList<POS>::Create(int indicator, Sci::Position length template <typename POS> void DecorationList<POS>::Delete(int indicator) { decorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(), - [indicator](const std::unique_ptr<Decoration<POS>> &deco) { + [indicator](const std::unique_ptr<Decoration<POS>> &deco) noexcept { return deco->Indicator() == indicator; }), decorationList.end()); current = nullptr; @@ -228,7 +228,7 @@ void DecorationList<POS>::DeleteRange(Sci::Position position, Sci::Position dele template <typename POS> void DecorationList<POS>::DeleteLexerDecorations() { decorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(), - [](const std::unique_ptr<Decoration<POS>> &deco) { + [](const std::unique_ptr<Decoration<POS>> &deco) noexcept { return deco->Indicator() < INDICATOR_CONTAINER ; }), decorationList.end()); current = nullptr; @@ -241,7 +241,7 @@ void DecorationList<POS>::DeleteAnyEmpty() { decorationList.clear(); } else { decorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(), - [](const std::unique_ptr<Decoration<POS>> &deco) { + [](const std::unique_ptr<Decoration<POS>> &deco) noexcept { return deco->Empty(); }), decorationList.end()); } diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 48090343a..47556f3ae 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -70,12 +70,12 @@ bool MarkerHandleSet::InsertHandle(int handle, int markerNum) { } void MarkerHandleSet::RemoveHandle(int handle) { - mhList.remove_if([handle](const MarkerHandleNumber &mhn) { return mhn.handle == handle; }); + mhList.remove_if([handle](const MarkerHandleNumber &mhn) noexcept { return mhn.handle == handle; }); } bool MarkerHandleSet::RemoveNumber(int markerNum, bool all) { bool performedDeletion = false; - mhList.remove_if([&](const MarkerHandleNumber &mhn) { + mhList.remove_if([&](const MarkerHandleNumber &mhn) noexcept { if ((all || !performedDeletion) && (mhn.number == markerNum)) { performedDeletion = true; return true; diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 8cdbb4f3d..7452a0f29 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -321,7 +321,7 @@ size_t ScreenLine::Length() const { size_t ScreenLine::RepresentationCount() const { return std::count_if(&ll->bidiData->widthReprs[start], &ll->bidiData->widthReprs[start + len], - [](XYPOSITION w) {return w > 0.0f; }); + [](XYPOSITION w) noexcept { return w > 0.0f; }); } XYPOSITION ScreenLine::Width() const { diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 30a77f872..92c94bf5a 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -310,10 +310,10 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) { } indicatorsDynamic = std::any_of(indicators.cbegin(), indicators.cend(), - [](const Indicator &indicator) { return indicator.IsDynamic(); }); + [](const Indicator &indicator) noexcept { return indicator.IsDynamic(); }); indicatorsSetFore = std::any_of(indicators.cbegin(), indicators.cend(), - [](const Indicator &indicator) { return indicator.OverridesTextFore(); }); + [](const Indicator &indicator) noexcept { return indicator.OverridesTextFore(); }); maxAscent = 1; maxDescent = 1; @@ -328,10 +328,10 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) { lineOverlap = lineHeight; someStylesProtected = std::any_of(styles.cbegin(), styles.cend(), - [](const Style &style) { return style.IsProtected(); }); + [](const Style &style) noexcept { return style.IsProtected(); }); someStylesForceCase = std::any_of(styles.cbegin(), styles.cend(), - [](const Style &style) { return style.caseForce != Style::caseMixed; }); + [](const Style &style) noexcept { return style.caseForce != Style::caseMixed; }); aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth; spaceWidth = styles[STYLE_DEFAULT].spaceWidth; |