diff options
| author | 2018-09-11 22:28:28 -0400 | |
|---|---|---|
| committer | 2018-09-11 22:28:35 -0400 | |
| commit | 7fe10dea3ede8553bcc4ac8e8a34707557f789b2 (patch) | |
| tree | 0c0e08bd519d003adf45843327b1af2c1d3ef4a3 | |
| parent | Merge pull request #1291 from lioncash/default (diff) | |
| download | yuzu-7fe10dea3ede8553bcc4ac8e8a34707557f789b2.tar.gz yuzu-7fe10dea3ede8553bcc4ac8e8a34707557f789b2.tar.xz yuzu-7fe10dea3ede8553bcc4ac8e8a34707557f789b2.zip | |
game_list: Use QJsonValueRef() within LoadCompatibilityList()
This way, we aren't constructing unnecessary QJsonValue instances.
| -rw-r--r-- | src/yuzu/game_list.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 8c6e16d47..9dfd6a708 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -366,7 +366,7 @@ void GameList::LoadCompatibilityList() { | |||
| 366 | QJsonDocument json = QJsonDocument::fromJson(string_content.toUtf8()); | 366 | QJsonDocument json = QJsonDocument::fromJson(string_content.toUtf8()); |
| 367 | QJsonArray arr = json.array(); | 367 | QJsonArray arr = json.array(); |
| 368 | 368 | ||
| 369 | for (const QJsonValue& value : arr) { | 369 | for (const QJsonValueRef& value : arr) { |
| 370 | QJsonObject game = value.toObject(); | 370 | QJsonObject game = value.toObject(); |
| 371 | 371 | ||
| 372 | if (game.contains("compatibility") && game["compatibility"].isDouble()) { | 372 | if (game.contains("compatibility") && game["compatibility"].isDouble()) { |
| @@ -374,7 +374,7 @@ void GameList::LoadCompatibilityList() { | |||
| 374 | QString directory = game["directory"].toString(); | 374 | QString directory = game["directory"].toString(); |
| 375 | QJsonArray ids = game["releases"].toArray(); | 375 | QJsonArray ids = game["releases"].toArray(); |
| 376 | 376 | ||
| 377 | for (const QJsonValue& value : ids) { | 377 | for (const QJsonValueRef& value : ids) { |
| 378 | QJsonObject object = value.toObject(); | 378 | QJsonObject object = value.toObject(); |
| 379 | QString id = object["id"].toString(); | 379 | QString id = object["id"].toString(); |
| 380 | compatibility_list.emplace( | 380 | compatibility_list.emplace( |