diff options
author | bunnei <bunneidev@gmail.com> | 2023-01-30 12:17:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 12:17:09 -0800 |
commit | ed4a88bd93c93ac1aaf5b6bae7d8ede10ff0338a (patch) | |
tree | 54b6ce04e859b1dee33f4331f392c0d645f4db43 /src/common/string_util.cpp | |
parent | e74660673b68e7226b7e934efe5eac620f7a98e6 (diff) | |
parent | b0722591c9b8c1aed5b8bfc5e67e7e957b08f209 (diff) |
Merge pull request #9508 from ameerj/hle-ipc-buffer-span
hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer
Diffstat (limited to 'src/common/string_util.cpp')
-rw-r--r-- | src/common/string_util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index b26db4796..e0b6180c5 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -30,7 +30,7 @@ std::string ToUpper(std::string str) { return str; } -std::string StringFromBuffer(const std::vector<u8>& data) { +std::string StringFromBuffer(std::span<const u8> data) { return std::string(data.begin(), std::find(data.begin(), data.end(), '\0')); } |