mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2025-01-31 06:57:28 +05:00
Allow resetting BasicDelimStringReader
This commit is contained in:
parent
550841b60a
commit
40726059f6
1 changed files with 8 additions and 3 deletions
|
@ -7,7 +7,7 @@ public:
|
||||||
BasicDelimStringReader( size_t size )
|
BasicDelimStringReader( size_t size )
|
||||||
: m_buffer( new T[size] ), m_size( size )
|
: m_buffer( new T[size] ), m_size( size )
|
||||||
{
|
{
|
||||||
m_cursor = m_buffer;
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
~BasicDelimStringReader()
|
~BasicDelimStringReader()
|
||||||
|
@ -41,10 +41,15 @@ public:
|
||||||
return curString;
|
return curString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void Reset()
|
||||||
|
{
|
||||||
|
m_cursor = m_buffer;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T* m_buffer;
|
T* const m_buffer;
|
||||||
const T* m_cursor;
|
const T* m_cursor;
|
||||||
size_t m_size;
|
const size_t m_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef BasicDelimStringReader<char> DelimStringReader;
|
typedef BasicDelimStringReader<char> DelimStringReader;
|
||||||
|
|
Loading…
Reference in a new issue