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())) { }