소스 검색

game_list_p: Take map iterator contents by const reference

We don't need to copy the whole struct in this instance, we can just
utilize a reference instead.
Lioncash 8 년 전
부모
커밋
51b5619079
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/yuzu/game_list_p.h

+ 1 - 1
src/yuzu/game_list_p.h

@@ -128,7 +128,7 @@ public:
             LOG_WARNING(Frontend, "Invalid compatibility number {}", compatiblity.toStdString());
             return;
         }
-        CompatStatus status = iterator->second;
+        const CompatStatus& status = iterator->second;
         setData(compatiblity, CompatNumberRole);
         setText(QObject::tr(status.text));
         setToolTip(QObject::tr(status.tooltip));