diff options
author | Neil <nyamatongwe@gmail.com> | 2023-01-25 17:21:47 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2023-01-25 17:21:47 +1100 |
commit | bf5bf207cb43572fa887fd30cb92e960b2a949c8 (patch) | |
tree | 2499acf67d1e2e99e07daf7c6bf9f72f6811122b /src/PositionCache.cxx | |
parent | cc899ffb690aa53cfaff02fafb5297515f292164 (diff) | |
download | scintilla-mirror-bf5bf207cb43572fa887fd30cb92e960b2a949c8.tar.gz |
Use LineLayout::LineNumber inside LineLayoutCache so it doesn't have to be
declared to be a friend.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r-- | src/PositionCache.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index f8b735bc0..a0aece160 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -574,21 +574,21 @@ std::shared_ptr<LineLayout> LineLayoutCache::Retrieve(Sci::Line lineNumber, Sci: size_t pos = 0; if (level == LineCache::Page) { // If first entry is this line then just reuse it. - if (!(cache[0] && (cache[0]->lineNumber == lineNumber))) { + if (!(cache[0] && (cache[0]->LineNumber() == lineNumber))) { const size_t posForLine = EntryForLine(lineNumber); if (lineNumber == lineCaret) { // Use position 0 for caret line. if (cache[0]) { // Another line is currently in [0] so move it out to its normal position. // Since it was recently the caret line its likely to be needed soon. - const size_t posNewForEntry0 = EntryForLine(cache[0]->lineNumber); + const size_t posNewForEntry0 = EntryForLine(cache[0]->LineNumber()); if (posForLine == posNewForEntry0) { std::swap(cache[0], cache[posNewForEntry0]); } else { cache[posNewForEntry0] = std::move(cache[0]); } } - if (cache[posForLine] && (cache[posForLine]->lineNumber == lineNumber)) { + if (cache[posForLine] && (cache[posForLine]->LineNumber() == lineNumber)) { // Caret line is currently somewhere else so move it to [0]. cache[0] = std::move(cache[posForLine]); } |