From afc11065bb151349090d8ae89cb61d1c35bdddae Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Mon, 28 Oct 2024 23:49:50 -0500 Subject: Prepare for new SSO. --- source/fud_utf8.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'source/fud_utf8.cpp') diff --git a/source/fud_utf8.cpp b/source/fud_utf8.cpp index bc12c15..ec72b6d 100644 --- a/source/fud_utf8.cpp +++ b/source/fud_utf8.cpp @@ -23,18 +23,13 @@ namespace fud { FudUtf8 FudUtf8::from(const String& fudString, size_t index) noexcept { - if (!fudString.valid()) { - return invalidAscii(); - } - - return from(StringView{fudString}, index); + return from(fudString.asView(), index); } FudUtf8 FudUtf8::from(StringView view, size_t index) noexcept { - auto viewLocal{view}; - auto len = viewLocal.length(); - const auto* vData = viewLocal.data(); + auto len = view.length(); + const auto* vData = view.data(); if (vData == nullptr) { return invalidAscii(); } -- cgit v1.2.3