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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user