From 0035079b6cf849dc5e2ae8face51fcfb99853efa Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 22 Mar 2021 17:21:20 +1100 Subject: Use XYPOSITION for xStart parameter as it is only passed as XYPOSITION. --- src/EditView.cxx | 4 ++-- src/PositionCache.cxx | 4 ++-- src/PositionCache.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/EditView.cxx b/src/EditView.cxx index fd1baf143..d8c4e45fe 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -1621,7 +1621,7 @@ void EditView::DrawBackground(Surface *surface, const EditModel &model, const Vi bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; // Does not take margin into account but not significant - const int xStartVisible = static_cast(subLineStart)-xStart; + const XYPOSITION xStartVisible = static_cast(subLineStart-xStart); BreakFinder bfBack(ll, &model.sel, lineRange, posLineStart, xStartVisible, selBackDrawn, model.pdoc, &model.reprs, nullptr); @@ -1837,7 +1837,7 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi const XYPOSITION indentWidth = model.pdoc->IndentSize() * vsDraw.spaceWidth; // Does not take margin into account but not significant - const int xStartVisible = static_cast(subLineStart)-xStart; + const XYPOSITION xStartVisible = static_cast(subLineStart-xStart); // Foreground drawing loop BreakFinder bfFore(ll, &model.sel, lineRange, posLineStart, xStartVisible, diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 418a4fef9..7e3459e5f 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -557,7 +557,7 @@ void BreakFinder::Insert(Sci::Position val) { } BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, Sci::Position posLineStart_, - int xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw) : + XYPOSITION xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw) : ll(ll_), lineRange(lineRange_), posLineStart(posLineStart_), @@ -572,7 +572,7 @@ BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lin // Search for first visible break // First find the first visible character if (xStart > 0.0f) - nextBreak = ll->FindBefore(static_cast(xStart), lineRange); + nextBreak = ll->FindBefore(xStart, lineRange); // Now back to a style break while ((nextBreak > lineRange.start) && (ll->styles[nextBreak] == ll->styles[nextBreak - 1])) { nextBreak--; diff --git a/src/PositionCache.h b/src/PositionCache.h index 0fb51dc38..5a3ec9bfd 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -255,7 +255,7 @@ public: // Try to make each subdivided run lengthEachSubdivision or shorter. enum { lengthEachSubdivision = 100 }; BreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, Sci::Position posLineStart_, - int xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw); + XYPOSITION xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw); // Deleted so BreakFinder objects can not be copied. BreakFinder(const BreakFinder &) = delete; BreakFinder(BreakFinder &&) = delete; -- cgit v1.2.3