Kaydet (Commit) 1cb3195f authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1438198 silence using invalid iterator

Change-Id: Ibccf6d3838335ae2d8a3a7f8187df8f2e173f043
Reviewed-on: https://gerrit.libreoffice.org/58482
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 668e68d3
......@@ -1737,8 +1737,11 @@ void ImpEditEngine::InitScriptTypes( sal_Int32 nPara )
++nIdx;
// Remove any entries *inside* the current run:
while ( nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd )
rTypes.erase( rTypes.begin()+nIdx );
while (nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd)
{
// coverity[use_iterator] - we're protected from a bad iterator by the above condition
rTypes.erase(rTypes.begin() + nIdx);
}
// special case:
if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd)
......
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