1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00

Remove opt::optional polyfill

std::optional is supported by Xcode 10. The non-polyfill variant was already used in our code, so this is not likely to break anything that wasn't broken before.
This commit is contained in:
Gymnasiast
2020-02-01 22:11:45 +01:00
parent fd6c709128
commit ca2f37ae7f
10 changed files with 24 additions and 50 deletions

View File

@@ -26,6 +26,7 @@
# include <algorithm>
# include <numeric>
# include <optional>
using namespace OpenRCT2;
@@ -75,7 +76,7 @@ bool ServerListEntry::IsVersionValid() const
return version.empty() || version == network_get_version();
}
opt::optional<ServerListEntry> ServerListEntry::FromJson(const json_t* server)
std::optional<ServerListEntry> ServerListEntry::FromJson(const json_t* server)
{
auto port = json_object_get(server, "port");
auto name = json_object_get(server, "name");