From d7acb6eca77b3a40f2cfcaf692de05dd532f4bf7 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 5 May 2013 11:52:33 +1000 Subject: Since new throws an exception on failure, remove testing of result. --- src/PositionCache.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/PositionCache.cxx') 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++; } } -- cgit v1.2.3