LZLookupTable: Reuse setLookAheadWindow within constructor

Provides the same behavior without duplicating code.
This commit is contained in:
Lioncash 2019-08-15 23:48:47 -04:00
parent 70aeed342f
commit a3a6e3b42a
1 changed files with 1 additions and 4 deletions

View File

@ -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);
}