Added symmetric check in dtor of ScopedMarkTokens.

This commit is contained in:
Yuri Gorshenin 2017-02-03 15:58:11 +03:00 committed by Sergey Yershov
parent ce7bc3a7f9
commit 3634449c05

View file

@ -94,6 +94,10 @@ struct ScopedMarkTokens
~ScopedMarkTokens()
{
#if defined(DEBUG)
for (size_t i : m_range)
ASSERT(m_usedTokens[i], (i));
#endif
fill(m_usedTokens.begin() + m_range.m_begin, m_usedTokens.begin() + m_range.m_end,
false /* used */);
}