aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/PositionCache.cxx6
-rw-r--r--src/PositionCache.h1
2 files changed, 3 insertions, 4 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]);
}
diff --git a/src/PositionCache.h b/src/PositionCache.h
index 0a3434929..e830b67dc 100644
--- a/src/PositionCache.h
+++ b/src/PositionCache.h
@@ -48,7 +48,6 @@ public:
*/
class LineLayout {
private:
- friend class LineLayoutCache;
std::unique_ptr<int []>lineStarts;
int lenLineStarts;
/// Drawing is only performed for @a maxLineLength characters on each line.