diff options
| author | Neil <nyamatongwe@gmail.com> | 2020-07-16 09:27:55 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2020-07-16 09:27:55 +1000 |
| commit | 97782cf42d51d2834a9a92f460a1cb7d483f09d7 (patch) | |
| tree | 7612f060f90404a275dde3aa13b04ced62191bd5 /src/PositionCache.cxx | |
| parent | 86fc59c515f92eb9407e5f981eab1f4d04a6d97e (diff) | |
| download | scintilla-mirror-97782cf42d51d2834a9a92f460a1cb7d483f09d7.tar.gz | |
Backport: Rename validLevel to ValidLevel and make an enum class.
Backport of changeset 8412:999c4c848b8f.
Diffstat (limited to 'src/PositionCache.cxx')
| -rw-r--r-- | src/PositionCache.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 06e3586f2..bb581d84a 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -54,7 +54,7 @@ LineLayout::LineLayout(int maxLineLength_) : maxLineLength(-1), numCharsInLine(0), numCharsBeforeEOL(0), - validity(llInvalid), + validity(ValidLevel::invalid), xHighlightGuide(0), highlightColumn(false), containsCaret(false), @@ -90,7 +90,7 @@ void LineLayout::Free() noexcept { lineStarts.reset(); } -void LineLayout::Invalidate(validLevel validity_) noexcept { +void LineLayout::Invalidate(ValidLevel validity_) noexcept { if (validity > validity_) validity = validity_; } @@ -289,14 +289,14 @@ void LineLayoutCache::Deallocate() noexcept { cache.clear(); } -void LineLayoutCache::Invalidate(LineLayout::validLevel validity_) noexcept { +void LineLayoutCache::Invalidate(LineLayout::ValidLevel validity_) noexcept { if (!cache.empty() && !allInvalidated) { for (const std::unique_ptr<LineLayout> &ll : cache) { if (ll) { ll->Invalidate(validity_); } } - if (validity_ == LineLayout::llInvalid) { + if (validity_ == LineLayout::ValidLevel::invalid) { allInvalidated = true; } } @@ -314,7 +314,7 @@ LineLayout *LineLayoutCache::Retrieve(Sci::Line lineNumber, Sci::Line lineCaret, Sci::Line linesOnScreen, Sci::Line linesInDoc) { AllocateForLevel(linesOnScreen, linesInDoc); if (styleClock != styleClock_) { - Invalidate(LineLayout::llCheckTextAndStyle); + Invalidate(LineLayout::ValidLevel::checkTextAndStyle); styleClock = styleClock_; } allInvalidated = false; |
