mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 03:36:36 +00:00
AK: Shrink Utf16View
Use a sentinel value instead of Optional for the cached length in code points, shrinking Utf16View from 32 to 24 bytes.
This commit is contained in:
parent
7628ddfaf7
commit
0c93a07fb1
Notes:
github-actions[bot]
2025-04-16 08:05:52 +00:00
Author: https://github.com/awesomekling
Commit: 0c93a07fb1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4370
2 changed files with 3 additions and 3 deletions
|
@ -135,7 +135,7 @@ private:
|
|||
size_t calculate_length_in_code_points() const;
|
||||
|
||||
ReadonlySpan<u16> m_code_units;
|
||||
NO_UNIQUE_ADDRESS mutable Optional<size_t> m_length_in_code_points;
|
||||
mutable size_t m_length_in_code_points { NumericLimits<size_t>::max() };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue