forked from qt-creator/qt-creator
Axivion: Use ref when iterating
Change-Id: I2fb674435141d1280bf6f36fbd1046ec69001dbc Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -644,10 +644,10 @@ void AxivionPluginPrivate::onDocumentClosed(IDocument *doc)
|
||||
if (it != m_docMarksTrees.end())
|
||||
m_docMarksTrees.erase(it);
|
||||
|
||||
const TextMarks marks = document->marks();
|
||||
for (auto m : marks) {
|
||||
if (m->category().id == AxivionTextMarkId)
|
||||
delete m;
|
||||
const TextMarks &marks = document->marks();
|
||||
for (TextMark *mark : marks) {
|
||||
if (mark->category().id == AxivionTextMarkId)
|
||||
delete mark;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user