summaryrefslogtreecommitdiff
path: root/src/common/string_util.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-01-30 12:17:09 -0800
committerGitHub <noreply@github.com>2023-01-30 12:17:09 -0800
commited4a88bd93c93ac1aaf5b6bae7d8ede10ff0338a (patch)
tree54b6ce04e859b1dee33f4331f392c0d645f4db43 /src/common/string_util.h
parente74660673b68e7226b7e934efe5eac620f7a98e6 (diff)
parentb0722591c9b8c1aed5b8bfc5e67e7e957b08f209 (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.h')
-rw-r--r--src/common/string_util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h
index ce18a33cf..f8aecc875 100644
--- a/src/common/string_util.h
+++ b/src/common/string_util.h
@@ -5,6 +5,7 @@
#pragma once
#include <cstddef>
+#include <span>
#include <string>
#include <vector>
#include "common/common_types.h"
@@ -17,7 +18,7 @@ namespace Common {
/// Make a string uppercase
[[nodiscard]] std::string ToUpper(std::string str);
-[[nodiscard]] std::string StringFromBuffer(const std::vector<u8>& data);
+[[nodiscard]] std::string StringFromBuffer(std::span<const u8> data);
[[nodiscard]] std::string StripSpaces(const std::string& s);
[[nodiscard]] std::string StripQuotes(const std::string& s);