diff options
Diffstat (limited to 'src/PositionCache.h')
-rw-r--r-- | src/PositionCache.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h index 41da53bcf..4c62900e8 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -61,7 +61,6 @@ private: int lenLineStarts; /// Drawing is only performed for @a maxLineLength characters on each line. Sci::Line lineNumber; - bool inCache; public: enum { wrapWidthInfinite = 0x7ffffff }; @@ -160,10 +159,9 @@ public: }; private: Cache level; - std::vector<std::unique_ptr<LineLayout>>cache; + std::vector<std::shared_ptr<LineLayout>>cache; bool allInvalidated; int styleClock; - int useCount; size_t EntryForLine(Sci::Line line) const noexcept; void AllocateForLevel(Sci::Line linesOnScreen, Sci::Line linesInDoc); public: @@ -178,9 +176,8 @@ public: void Invalidate(LineLayout::ValidLevel validity_) noexcept; void SetLevel(Cache level_) noexcept; Cache GetLevel() const noexcept { return level; } - LineLayout *Retrieve(Sci::Line lineNumber, Sci::Line lineCaret, int maxChars, int styleClock_, + std::shared_ptr<LineLayout> Retrieve(Sci::Line lineNumber, Sci::Line lineCaret, int maxChars, int styleClock_, Sci::Line linesOnScreen, Sci::Line linesInDoc); - void Dispose(LineLayout *ll) noexcept; }; class PositionCacheEntry { |