mirror of https://github.com/OpenRCT2/OpenRCT2.git
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:
parent
9b1321067b
commit
6e6fe3c3c1
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue