diff --git a/include/LZ77/LZLookupTable.hpp b/include/LZ77/LZLookupTable.hpp index bd66516..6fb4df0 100644 --- a/include/LZ77/LZLookupTable.hpp +++ b/include/LZ77/LZLookupTable.hpp @@ -24,8 +24,8 @@ public: private: typedef std::multimap, int32_t> LookupTable; LookupTable table; - atInt32 m_minimumMatch; - atInt32 m_slidingWindow; - atInt32 m_lookAheadWindow; + atInt32 m_minimumMatch = 3; + atInt32 m_slidingWindow = 4096; + atInt32 m_lookAheadWindow = 18; std::vector m_buffer; }; diff --git a/src/LZ77/LZLookupTable.cpp b/src/LZ77/LZLookupTable.cpp index f2fcea5..83d346d 100644 --- a/src/LZ77/LZLookupTable.cpp +++ b/src/LZ77/LZLookupTable.cpp @@ -1,12 +1,7 @@ #include "LZ77/LZLookupTable.hpp" #include -LZLookupTable::LZLookupTable() { - m_minimumMatch = 3; - m_slidingWindow = 4096; - m_lookAheadWindow = 18; - m_buffer.resize(m_minimumMatch); -} +LZLookupTable::LZLookupTable() : m_buffer(m_minimumMatch) {} LZLookupTable::LZLookupTable(atInt32 minimumMatch, atInt32 slidingWindow, atInt32 lookAheadWindow) { if (minimumMatch > 0)