1
0
Fork 0
forked from suyu/suyu

Merge pull request #5150 from comex/xx-boxcat

boxcat: Avoid unnecessary object copy
This commit is contained in:
LC 2020-12-07 00:07:39 -05:00 committed by GitHub
commit 43f0b42088
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -483,7 +483,7 @@ Boxcat::StatusResult Boxcat::GetStatus(std::optional<std::string>& global,
global = json["global"].get<std::string>(); global = json["global"].get<std::string>();
if (json["games"].is_array()) { if (json["games"].is_array()) {
for (const auto object : json["games"]) { for (const auto& object : json["games"]) {
if (object.is_object() && object.find("name") != object.end()) { if (object.is_object() && object.find("name") != object.end()) {
EventStatus detail{}; EventStatus detail{};
if (object["header"].is_string()) { if (object["header"].is_string()) {