From f96ffc423d8af568c0f1dc066a4adbec54d49bdb Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 26 Mar 2021 15:40:37 +1100 Subject: Minor changes: const, constexpr, and noexcept. --- src/EditView.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/EditView.cxx') diff --git a/src/EditView.cxx b/src/EditView.cxx index d8c4e45fe..44c25ada0 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -340,7 +340,7 @@ constexpr XYPOSITION epsilon = 0.0001f; // A small nudge to avoid floating point * This only affects ASCII characters and is provided for languages with case-insensitive * ASCII keywords where the user wishes to view keywords in a preferred case. */ -inline char CaseForce(Style::CaseForce caseForce, char chDoc, char chPrevious) { +inline char CaseForce(Style::CaseForce caseForce, char chDoc, char chPrevious) noexcept { switch (caseForce) { case Style::CaseForce::mixed: return chDoc; @@ -1305,7 +1305,7 @@ void EditView::DrawEOLAnnotationText(Surface *surface, const EditModel &model, c rcSegment.right = rcSegment.left + static_cast(widthEOLAnnotationText); const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); - ColourDesired textFore = vsDraw.styles[style].fore; + const ColourDesired textFore = vsDraw.styles[style].fore; const ColourDesired textBack = TextBackground(model, vsDraw, ll, background, false, false, static_cast(style), -1); -- cgit v1.2.3