Kaydet (Commit) b60285e9 authored tarafından Michael Stahl's avatar Michael Stahl

SwpHintsArray: deploy some asserts

Change-Id: I16f416cb63221860ff743ce2e2291af99cd19de2
üst 43377e09
......@@ -130,14 +130,10 @@ bool CompareSwpHtEnd::operator()(SwTxtAttr* const lhs, SwTxtAttr* const rhs) con
void SwpHintsArray::Insert( const SwTxtAttr *pHt )
{
Resort();
#if OSL_DEBUG_LEVEL > 0
OSL_ENSURE(
m_HintStarts.find(const_cast<SwTxtAttr*>(pHt)) == m_HintStarts.end(),
"Insert: hint already in HtStart");
OSL_ENSURE(
m_HintEnds.find(const_cast<SwTxtAttr*>(pHt)) == m_HintEnds.end(),
"Insert: hint already in HtEnd");
#endif
assert(m_HintStarts.find(const_cast<SwTxtAttr*>(pHt))
== m_HintStarts.end()); // "Insert: hint already in HtStart"
assert(m_HintEnds.find(const_cast<SwTxtAttr*>(pHt))
== m_HintEnds.end()); // "Insert: hint already in HtEnd"
m_HintStarts.insert( const_cast<SwTxtAttr*>(pHt) );
m_HintEnds .insert( const_cast<SwTxtAttr*>(pHt) );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment