diff options
Diffstat (limited to 'Source/Core/UICommon/NetPlayIndex.cpp')
| -rw-r--r-- | Source/Core/UICommon/NetPlayIndex.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/UICommon/NetPlayIndex.cpp b/Source/Core/UICommon/NetPlayIndex.cpp index f6f3b57754..1d4b5e0b8a 100644 --- a/Source/Core/UICommon/NetPlayIndex.cpp +++ b/Source/Core/UICommon/NetPlayIndex.cpp @@ -5,6 +5,7 @@ #include <chrono> #include <numeric> +#include <span> #include <string> #include <picojson.h> @@ -23,14 +24,13 @@ NetPlayIndex::~NetPlayIndex() Remove(); } -static std::optional<picojson::value> ParseResponse(const std::vector<u8>& response) +static std::optional<picojson::value> ParseResponse(std::span<const u8> response) { - const std::string response_string(reinterpret_cast<const char*>(response.data()), - response.size()); + const char* data = reinterpret_cast<const char*>(response.data()); picojson::value json; - const auto error = picojson::parse(json, response_string); + const auto error = picojson::parse(json, data, data + response.size()); if (!error.empty()) return {}; |
