From 29f72cb83b1565132c075ba815afbaa2b6e421d1 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 22 Apr 2026 09:08:34 +1000 Subject: Rename parameters to avoid clang-tidy readability-suspicious-call-argument warnings. --- src/EditView.cxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/EditView.cxx') diff --git a/src/EditView.cxx b/src/EditView.cxx index 154954c70..b25053845 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -2532,14 +2532,14 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, const V for (;;) { int yposScreen = screenLinePaintFirst * vsDraw.lineHeight; int ypos = bufferedDraw ? 0 : yposScreen; - Sci::Line visibleLine = model.TopLineOfMain() + screenLinePaintFirst; - while (visibleLine < model.pcs->LinesDisplayed() && yposScreen < rcArea.bottom) { + Sci::Line lineVisible = model.TopLineOfMain() + screenLinePaintFirst; + while (lineVisible < model.pcs->LinesDisplayed() && yposScreen < rcArea.bottom) { - const Sci::Line lineDoc = model.pcs->DocFromDisplay(visibleLine); + const Sci::Line lineDoc = model.pcs->DocFromDisplay(lineVisible); // Only visible lines should be handled by the code within the loop PLATFORM_ASSERT(model.pcs->GetVisible(lineDoc)); const Sci::Line lineStartSet = model.pcs->DisplayFromDoc(lineDoc); - const int subLine = static_cast(visibleLine - lineStartSet); + const int subLine = static_cast(lineVisible - lineStartSet); // Copy this line and its styles from the document into local arrays // and determine the x position at which each character starts. @@ -2581,7 +2581,7 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, const V surface->FillRectangleAligned(rcSpacer, Fill(vsDraw.styles[StyleDefault].back)); } - DrawLine(surface, model, vsDraw, ll.get(), lineDoc, visibleLine, xOrigin, rcLine, subLine, phase); + DrawLine(surface, model, vsDraw, ll.get(), lineDoc, lineVisible, xOrigin, rcLine, subLine, phase); #if defined(TIME_PAINTING) durPaint += ep.Duration(true); #endif @@ -2616,7 +2616,7 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, const V } yposScreen += vsDraw.lineHeight; - visibleLine++; + lineVisible++; } if (phase >= DrawPhase::carets) { @@ -2763,7 +2763,7 @@ Sci::Position EditView::FormatRange(bool draw, CharacterRangeFull chrg, Rectangl Sci::Line lineDoc = linePrintStart; Sci::Position nPrintPos = chrg.cpMin; - int visibleLine = 0; + int lineVisible = 0; int widthPrint = rc.right - rc.left - vsPrint.fixedColumnWidth; if (printParameters.wrapState == Wrap::None) widthPrint = LineLayout::wrapWidthInfinite; @@ -2792,23 +2792,23 @@ Sci::Position EditView::FormatRange(bool draw, CharacterRangeFull chrg, Rectangl // When document line is wrapped over multiple display lines, find where // to start printing from to ensure a particular position is on the first // line of the page. - if (visibleLine == 0) { + if (lineVisible == 0) { const Sci::Position startWithinLine = nPrintPos - model.pdoc->LineStart(lineDoc); for (int iwl = 0; iwl < ll.lines - 1; iwl++) { if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) { - visibleLine = -iwl; + lineVisible = -iwl; } } if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) { - visibleLine = -(ll.lines - 1); + lineVisible = -(ll.lines - 1); } } if (draw && lineNumberWidth && (ypos + vsPrint.lineHeight <= rc.bottom) && - (visibleLine >= 0)) { + (lineVisible >= 0)) { const std::string number = std::to_string(lineDoc + 1) + lineNumberPrintSpace; PRectangle rcNumber = rcLine; rcNumber.right = rcNumber.left + lineNumberWidth; @@ -2827,15 +2827,15 @@ Sci::Position EditView::FormatRange(bool draw, CharacterRangeFull chrg, Rectangl for (int iwl = 0; iwl < ll.lines; iwl++) { if (ypos + vsPrint.lineHeight <= rc.bottom) { - if (visibleLine >= 0) { + if (lineVisible >= 0) { if (draw) { rcLine.top = static_cast(ypos); rcLine.bottom = static_cast(ypos + vsPrint.lineHeight); - DrawLine(surface, model, vsPrint, &ll, lineDoc, visibleLine, xOrigin, rcLine, iwl, DrawPhase::all); + DrawLine(surface, model, vsPrint, &ll, lineDoc, lineVisible, xOrigin, rcLine, iwl, DrawPhase::all); } ypos += vsPrint.lineHeight; } - visibleLine++; + lineVisible++; if (iwl == ll.lines - 1) nPrintPos = model.pdoc->LineStart(lineDoc + 1); else -- cgit v1.2.3