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
1 changed files with 3 additions and 3 deletions

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);
}
}
}