Skip to content

Commit

Permalink
GUI: Add const in some range based for loops
Browse files Browse the repository at this point in the history
  • Loading branch information
fdde authored and DrMcCoy committed Dec 27, 2017
1 parent e617ebb commit a24d587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/resourcetree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void ResourceTree::populate(const QString& path, ResourceTreeItem *parent) {

QFileInfoList list = dir.entryInfoList();

for (auto &e : list) {
for (const auto &e : list) {
curItem = new ResourceTreeItem(e.canonicalFilePath(), parent);
parent->appendChild(curItem);
if (e.isDir()) {
Expand Down Expand Up @@ -285,7 +285,7 @@ void ResourceTree::insertItems(int position, QList<ResourceTreeItem*> &items, co

beginInsertRows(parent, position, position + items.count() - 1);

for (auto &child : items)
for (const auto &child : items)
parentItem->appendChild(child);

endInsertRows();
Expand Down

0 comments on commit a24d587

Please sign in to comment.