1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-29 04:06:40 +00:00

Use string_view

This commit is contained in:
Evil Eye 2021-11-10 21:37:29 +01:00
parent 751e8cf76b
commit c6470f33d3

View file

@ -3,6 +3,7 @@
#include <cstring> #include <cstring>
#include <string> #include <string>
#include <string_view>
#include <tuple> #include <tuple>
class Utf8Stream class Utf8Stream
@ -30,8 +31,8 @@ public:
{ {
} }
Utf8Stream (const std::string& str) : Utf8Stream (std::string_view str) :
Utf8Stream (reinterpret_cast<Point>(str.c_str()), reinterpret_cast<Point>(str.c_str() + str.size())) Utf8Stream (reinterpret_cast<Point>(str.data()), reinterpret_cast<Point>(str.data() + str.size()))
{ {
} }