mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Replace coverity annotation by an assertion
And reorganize the code a bit.
This commit is contained in:
parent
51afcd4f4c
commit
abc0aaec12
@ -2037,17 +2037,18 @@ void TabWorkArea::updateTabTexts()
|
||||
continue;
|
||||
}
|
||||
|
||||
// we found a non-atomic segment segStart <= sit <= it < next.
|
||||
// We found a non-atomic segment
|
||||
// We know that segStart <= it < next <= paths.end().
|
||||
// The assertion below tells coverity about it.
|
||||
LATTEST(segStart != paths.end());
|
||||
QString dspString = segStart->forecastPathString();
|
||||
LYXERR(Debug::GUI, "first forecast found for "
|
||||
<< segStart->abs() << " => " << dspString);
|
||||
It sit = segStart;
|
||||
++sit;
|
||||
// Shift path segments and hope for the best
|
||||
// that it makes the path more unique.
|
||||
somethingChanged = true;
|
||||
It sit = segStart;
|
||||
// this is ok for the reason mentioned in the previous comment.
|
||||
// coverity[INVALIDATE_ITERATOR]
|
||||
QString dspString = sit->forecastPathString();
|
||||
LYXERR(Debug::GUI, "first forecast found for "
|
||||
<< sit->abs() << " => " << dspString);
|
||||
++sit;
|
||||
bool moreUnique = false;
|
||||
for (; sit != next; ++sit) {
|
||||
if (sit->forecastPathString() != dspString) {
|
||||
|
Loading…
Reference in New Issue
Block a user