Commit 30e0e053 authored by Eugene Popov's avatar Eugene Popov 🇺🇦
Browse files

Use std::as_const to prevent container from detaching

parent 8b034487
Pipeline #225123 passed with stage
in 5 minutes and 33 seconds
......@@ -78,7 +78,7 @@ void KateTabBar::readConfig()
lruDocs[m_docToLruCounterAndHasTab[doc].first] = doc;
}
int toRemove = docList.count() - m_tabCountLimit;
for (KTextEditor::Document *doc : lruDocs) {
for (KTextEditor::Document *doc : std::as_const(lruDocs)) {
if (toRemove-- == 0) {
break;
}
......
Supports Markdown
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