aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-04-26 18:06:06 +1000
committerNeil <nyamatongwe@gmail.com>2021-04-26 18:06:06 +1000
commit4dcd314b9a77c93f650f5ff4e42b3695366e0095 (patch)
treea495cbab189fc35a754ef335c90c2e696dce372c /src/EditView.cxx
parent8f04bd4802e0e6063175b20d36df0d812b6a5db4 (diff)
downloadscintilla-mirror-4dcd314b9a77c93f650f5ff4e42b3695366e0095.tar.gz
Avoid some warnings.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r--src/EditView.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 137d4f4fe..08bdfb55c 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -186,8 +186,7 @@ EditView::EditView() {
customDrawWrapMarker = nullptr;
}
-EditView::~EditView() {
-}
+EditView::~EditView() = default;
bool EditView::SetTwoPhaseDraw(bool twoPhaseDraw) noexcept {
const PhasesDraw phasesDrawNew = twoPhaseDraw ? PhasesDraw::two : PhasesDraw::one;
@@ -376,7 +375,7 @@ void EditView::LayoutLine(const EditModel &model, Sci::Line line, Surface *surfa
return;
PLATFORM_ASSERT(line < model.pdoc->LinesTotal());
- PLATFORM_ASSERT(ll->chars != NULL);
+ PLATFORM_ASSERT(ll->chars);
const Sci::Position posLineStart = model.pdoc->LineStart(line);
Sci::Position posLineEnd = model.pdoc->LineStart(line + 1);
// If the line is very long, limit the treatment to a length that should fit in the viewport
@@ -525,6 +524,8 @@ void EditView::LayoutLine(const EditModel &model, Sci::Line line, Surface *surfa
case SC_WRAPINDENT_DEEPINDENT:
wrapAddIndent = model.pdoc->IndentSize() * 2 * vstyle.spaceWidth;
break;
+ default: // No additional indent for SC_WRAPINDENT_FIXED
+ break;
}
ll->wrapIndent = wrapAddIndent;
if (vstyle.wrap.indentMode != SC_WRAPINDENT_FIXED) {
@@ -1979,7 +1980,7 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi
textFore = *vsDraw.whitespaceColours.fore;
const PRectangle rcTab(rcSegment.left + 1, rcSegment.top + tabArrowHeight,
rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent);
- const int segmentTop = static_cast<int>(rcSegment.top + vsDraw.lineHeight / 2);
+ const int segmentTop = static_cast<int>(rcSegment.top) + vsDraw.lineHeight / 2;
if (!customDrawTabArrow)
DrawTabArrow(surface, rcTab, segmentTop, vsDraw, Stroke(textFore, 1.0f));
else