Original Post
I assume it is legal to call clear() on an empty std::map. However, in the code below the first ASSERT does not trigger but the second ASSERT does trigger. In the debugger I see that the size of m_pDrawSelectedUnitMap is -1 (0xffffffff) after the clear. What could I have done previously to the state of m_pDrawSelectedUnitMap to screw this up? I would think that 'empty' means empty and any other map state would be irrelevant or consistent. thanks
ASSERT(pPlayerInfo->m_pDrawSelectedUnitMap->empty());
pPlayerInfo->m_pDrawSelectedUnitMap->clear();
ASSERT(pPlayerInfo->m_pDrawSelectedUnitMap->empty());