From a3a6e3b42aa47f2d0ca2865de45ccef02c833201 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 15 Aug 2019 23:48:47 -0400 Subject: [PATCH] LZLookupTable: Reuse setLookAheadWindow within constructor Provides the same behavior without duplicating code. --- src/LZ77/LZLookupTable.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/LZ77/LZLookupTable.cpp b/src/LZ77/LZLookupTable.cpp index 83d346d..805c123 100644 --- a/src/LZ77/LZLookupTable.cpp +++ b/src/LZ77/LZLookupTable.cpp @@ -14,10 +14,7 @@ LZLookupTable::LZLookupTable(atInt32 minimumMatch, atInt32 slidingWindow, atInt3 else m_slidingWindow = 4096; - if (lookAheadWindow > 0) - m_lookAheadWindow = lookAheadWindow; - else - m_lookAheadWindow = 18; + setLookAheadWindow(lookAheadWindow); m_buffer.reserve(m_minimumMatch); }