diff options
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r-- | src/PositionCache.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 9fb045636..b03a97d38 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -309,12 +309,10 @@ LineLayout *LineLayoutCache::Retrieve(int lineNumber, int lineCaret, int maxChar if (!cache[pos]) { cache[pos] = new LineLayout(maxChars); } - if (cache[pos]) { - cache[pos]->lineNumber = lineNumber; - cache[pos]->inCache = true; - ret = cache[pos]; - useCount++; - } + cache[pos]->lineNumber = lineNumber; + cache[pos]->inCache = true; + ret = cache[pos]; + useCount++; } } |