forked from qt-creator/qt-creator
QmlDesigner: performance-for-range-copy
Avoid copying the loop variable on each iteration if a const reference would suffice. For QPointers<>, this change only adds a const. Change-Id: I5abe7d793cd46859a9a4f9304ec1bd41f899d72c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -294,7 +294,7 @@ void ItemLibraryModel::sortSections()
|
||||
|
||||
std::sort(m_sections.begin(), m_sections.end(), sectionSort);
|
||||
|
||||
for (auto itemLibrarySection : m_sections)
|
||||
for (const auto itemLibrarySection : m_sections)
|
||||
itemLibrarySection->sortItems();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user