mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-23 17:58:59 +00:00
AK: Mark a couple of methods in Utf16View.h as constexpr
This commit is contained in:
parent
265e278275
commit
0bbb725bcd
Notes:
github-actions[bot]
2025-07-22 15:19:08 +00:00
Author: https://github.com/trflynn89
Commit: 0bbb725bcd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5564
Reviewed-by: https://github.com/gmta ✅
1 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ public:
|
|||
return m_iterator.utf16 == other.m_iterator.utf16;
|
||||
}
|
||||
|
||||
[[nodiscard]] ALWAYS_INLINE size_t length_in_code_units()
|
||||
[[nodiscard]] constexpr size_t length_in_code_units()
|
||||
{
|
||||
if (has_ascii_storage())
|
||||
return 1;
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
Utf16String to_ascii_uppercase() const;
|
||||
Utf16String to_ascii_titlecase() const;
|
||||
|
||||
[[nodiscard]] ALWAYS_INLINE bool has_ascii_storage() const { return m_length_in_code_units >> Detail::UTF16_FLAG == 0; }
|
||||
[[nodiscard]] constexpr bool has_ascii_storage() const { return m_length_in_code_units >> Detail::UTF16_FLAG == 0; }
|
||||
|
||||
[[nodiscard]] constexpr ReadonlyBytes bytes() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue