1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Replace optional.value() with *optional (fix Xcode compilation)

Xcode cannot handle the optional.value() notation, but *optional
should mean the same.

Also see https://en.cppreference.com/w/cpp/utility/optional/operator*
This commit is contained in:
Gymnasiast
2019-05-06 19:55:42 +02:00
committed by Ted John
parent 9b1321067b
commit 6e6fe3c3c1

View File

@@ -273,8 +273,8 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchLocalServerListAsync(
auto entry = ServerListEntry::FromJson(jinfo);
if (entry.has_value())
{
entry.value().local = true;
entries.push_back(entry.value());
(*entry).local = true;
entries.push_back(*entry);
}
json_decref(jinfo);
@@ -375,7 +375,7 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchOnlineServerListAsync
auto entry = ServerListEntry::FromJson(jServer);
if (entry.has_value())
{
entries.push_back(entry.value());
entries.push_back(*entry);
}
}
}