From 6e6fe3c3c1b111b6098798eb4d407db369ab20af Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 6 May 2019 19:55:42 +0200 Subject: [PATCH] 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* --- src/openrct2/network/ServerList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/network/ServerList.cpp b/src/openrct2/network/ServerList.cpp index 41bbe696b3..324d431b3e 100644 --- a/src/openrct2/network/ServerList.cpp +++ b/src/openrct2/network/ServerList.cpp @@ -273,8 +273,8 @@ std::future> 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> ServerList::FetchOnlineServerListAsync auto entry = ServerListEntry::FromJson(jServer); if (entry.has_value()) { - entries.push_back(entry.value()); + entries.push_back(*entry); } } }