1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 08:45:00 +01:00

Using std::move(), correct clear strings, better use '= default;', modernize make_* and replace heavy strlen

This commit is contained in:
germanaizek
2022-04-25 16:37:32 +03:00
committed by Hielke Morsink
parent 0045aed7f9
commit 958bfbc08a
28 changed files with 59 additions and 67 deletions

View File

@@ -174,7 +174,7 @@ std::vector<ServerListEntry> ServerList::ReadFavourites() const
serverInfo.Name = fs.ReadStdString();
serverInfo.RequiresPassword = false;
serverInfo.Description = fs.ReadStdString();
serverInfo.Version = "";
serverInfo.Version.clear();
serverInfo.Favourite = true;
serverInfo.Players = 0;
serverInfo.MaxPlayers = 0;
@@ -340,7 +340,7 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchOnlineServerListAsync
}
Http::Request request;
request.url = masterServerUrl;
request.url = std::move(masterServerUrl);
request.method = Http::Method::GET;
request.header["Accept"] = "application/json";
Http::DoAsync(request, [p](Http::Response& response) -> void {