Prechádzať zdrojové kódy

game_list: Make the AddEntry argument a const reference

appendRow takes a QList by const reference, so it doesn't need to be
modifiable.
Lioncash 9 rokov pred
rodič
commit
db33d7668e
2 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 1 1
      src/citra_qt/game_list.cpp
  2. 1 1
      src/citra_qt/game_list.h

+ 1 - 1
src/citra_qt/game_list.cpp

@@ -49,7 +49,7 @@ GameList::~GameList() {
     emit ShouldCancelWorker();
     emit ShouldCancelWorker();
 }
 }
 
 
-void GameList::AddEntry(QList<QStandardItem*> entry_items) {
+void GameList::AddEntry(const QList<QStandardItem*>& entry_items) {
     item_model->invisibleRootItem()->appendRow(entry_items);
     item_model->invisibleRootItem()->appendRow(entry_items);
 }
 }
 
 

+ 1 - 1
src/citra_qt/game_list.h

@@ -34,7 +34,7 @@ public:
     void LoadInterfaceLayout();
     void LoadInterfaceLayout();
 
 
 public slots:
 public slots:
-    void AddEntry(QList<QStandardItem*> entry_items);
+    void AddEntry(const QList<QStandardItem*>& entry_items);
 
 
 private slots:
 private slots:
     void ValidateEntry(const QModelIndex& item);
     void ValidateEntry(const QModelIndex& item);