From c6470f33d363e5139ffb78c1a6e64c2ed09e0a44 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Wed, 10 Nov 2021 21:37:29 +0100 Subject: [PATCH] Use string_view --- components/misc/utf8stream.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/misc/utf8stream.hpp b/components/misc/utf8stream.hpp index efa3e4939a..8435816c67 100644 --- a/components/misc/utf8stream.hpp +++ b/components/misc/utf8stream.hpp @@ -3,6 +3,7 @@ #include #include +#include #include class Utf8Stream @@ -30,8 +31,8 @@ public: { } - Utf8Stream (const std::string& str) : - Utf8Stream (reinterpret_cast(str.c_str()), reinterpret_cast(str.c_str() + str.size())) + Utf8Stream (std::string_view str) : + Utf8Stream (reinterpret_cast(str.data()), reinterpret_cast(str.data() + str.size())) { }