diff --git a/AK/UnicodeUtils.h b/AK/UnicodeUtils.h index 3d037c6275c..519426e6fe4 100644 --- a/AK/UnicodeUtils.h +++ b/AK/UnicodeUtils.h @@ -137,7 +137,7 @@ template } template Callback> -constexpr ErrorOr try_code_point_to_utf16(u32 code_point, Callback callback) +ALWAYS_INLINE ErrorOr try_code_point_to_utf16(u32 code_point, Callback callback) { if (code_point < FIRST_SUPPLEMENTARY_PLANE_CODE_POINT) { TRY(callback(static_cast(code_point))); diff --git a/AK/Utf16View.h b/AK/Utf16View.h index 0c396983ac2..910544df74e 100644 --- a/AK/Utf16View.h +++ b/AK/Utf16View.h @@ -88,7 +88,7 @@ public: } private: - Utf16CodePointIterator(char16_t const* ptr, size_t length) + constexpr Utf16CodePointIterator(char16_t const* ptr, size_t length) : m_iterator(ptr) , m_remaining_code_units(length) { @@ -346,9 +346,7 @@ struct Traits : public DefaultTraits { [[nodiscard]] ALWAYS_INLINE AK_STRING_VIEW_LITERAL_CONSTEVAL AK::Utf16View operator""sv(char16_t const* string, size_t length) { - AK::Utf16View view { string, length }; - ASSERT(view.validate()); - return view; + return { string, length }; } #if USING_AK_GLOBALLY