1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:17:46 +00:00

Revert "Unicode: s/codepoint/code_point/g"

This reverts commit ea9ac3155d.
It replaced "codepoint" with "code_points", not "code_point".
This commit is contained in:
Nico Weber 2020-08-05 16:28:19 -04:00 committed by Andreas Kling
parent 9664bac281
commit 19ac1f6368
45 changed files with 449 additions and 449 deletions

View file

@ -90,22 +90,22 @@ public:
u16 length() const { return m_length; }
u32 code_points(size_t index) const
u32 codepoint(size_t index) const
{
if (m_utf32)
return m_code_pointss.as_u32[index];
return m_code_pointss.as_u8[index];
return m_codepoints.as_u32[index];
return m_codepoints.as_u8[index];
}
void set_code_points(size_t index, u32 code_points)
void set_codepoint(size_t index, u32 codepoint)
{
if (!m_utf32 && code_points & 0xffffff80u)
if (!m_utf32 && codepoint & 0xffffff80u)
convert_to_utf32();
if (m_utf32)
m_code_pointss.as_u32[index] = code_points;
m_codepoints.as_u32[index] = codepoint;
else
m_code_pointss.as_u8[index] = code_points;
m_codepoints.as_u8[index] = codepoint;
}
bool is_dirty() const { return m_dirty; }
@ -122,7 +122,7 @@ private:
union {
u8* as_u8;
u32* as_u32;
} m_code_pointss { nullptr };
} m_codepoints { nullptr };
Attribute* m_attributes { nullptr };
bool m_dirty { false };
bool m_utf32 { false };