From ffd3afcf2fec718c86d664ede2fa3801b8fc746c Mon Sep 17 00:00:00 2001 From: lat9nq Date: Sun, 15 May 2022 18:06:33 -0400 Subject: string_util: Add U16StringFromBuffer Qt's QString::toStdU16String doesn't work when compiling against the latest libstdc++, at least when using Clang. This function effectively does the same thing as the aforementioned one. --- src/common/string_util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common/string_util.h') diff --git a/src/common/string_util.h b/src/common/string_util.h index a33830aec..ce18a33cf 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h @@ -44,6 +44,8 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _ #endif +[[nodiscard]] std::u16string U16StringFromBuffer(const u16* input, std::size_t length); + /** * Compares the string defined by the range [`begin`, `end`) to the null-terminated C-string * `other` for equality. -- cgit v1.2.3