diff options
author | Neil <nyamatongwe@gmail.com> | 2017-04-06 21:04:37 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-04-06 21:04:37 +1000 |
commit | cda15af9657880e91ccf65603e109b202d9e78bf (patch) | |
tree | eb730cdcc810842ce2255c3d2af9872041583a74 /src/PositionCache.cxx | |
parent | dba2fe55b8a4ab4ac34795fe4a4b30a729c77016 (diff) | |
download | scintilla-mirror-cda15af9657880e91ccf65603e109b202d9e78bf.tar.gz |
Added const where possible.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r-- | src/PositionCache.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 2850e4fbd..1572f2beb 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -189,7 +189,7 @@ void LineLayout::RestoreBracesHighlight(Range rangeLine, const Sci::Position bra int LineLayout::FindBefore(XYPOSITION x, int lower, int upper) const { do { int middle = (upper + lower + 1) / 2; // Round high - XYPOSITION posMiddle = positions[middle]; + const XYPOSITION posMiddle = positions[middle]; if (x < posMiddle) { upper = middle - 1; } else { @@ -469,11 +469,11 @@ BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lin } if (breakForSelection) { - SelectionPosition posStart(posLineStart); - SelectionPosition posEnd(posLineStart + lineRange.end); - SelectionSegment segmentLine(posStart, posEnd); + const SelectionPosition posStart(posLineStart); + const SelectionPosition posEnd(posLineStart + lineRange.end); + const SelectionSegment segmentLine(posStart, posEnd); for (size_t r=0; r<psel->Count(); r++) { - SelectionSegment portion = psel->Range(r).Intersect(segmentLine); + const SelectionSegment portion = psel->Range(r).Intersect(segmentLine); if (!(portion.start == portion.end)) { if (portion.start.IsValid()) Insert(portion.start.Position() - posLineStart); @@ -653,7 +653,7 @@ void PositionCache::SetSize(size_t size_) { } void PositionCache::MeasureWidths(Surface *surface, const ViewStyle &vstyle, unsigned int styleNumber, - const char *s, unsigned int len, XYPOSITION *positions, Document *pdoc) { + const char *s, unsigned int len, XYPOSITION *positions, const Document *pdoc) { allClear = false; size_t probe = pces.size(); // Out of bounds |