mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +00:00
AK: Use new format functions.
This commit is contained in:
parent
560c52989c
commit
1d96d5eea4
13 changed files with 74 additions and 91 deletions
|
@ -197,13 +197,11 @@ u32 Utf8CodepointIterator::operator*() const
|
|||
int code_point_length_in_bytes = 0;
|
||||
|
||||
bool first_byte_makes_sense = decode_first_byte(m_ptr[0], code_point_length_in_bytes, code_point_value_so_far);
|
||||
if (!first_byte_makes_sense) {
|
||||
dbg() << "First byte doesn't make sense, bytes: " << StringView((const char*)m_ptr, m_length);
|
||||
}
|
||||
if (!first_byte_makes_sense)
|
||||
dbgln("First byte doesn't make sense, bytes: {}", StringView { (const char*)m_ptr, (size_t)m_length });
|
||||
ASSERT(first_byte_makes_sense);
|
||||
if (code_point_length_in_bytes > m_length) {
|
||||
dbg() << "Not enough bytes (need " << code_point_length_in_bytes << ", have " << m_length << "), first byte is: " << m_ptr[0] << " " << (const char*)m_ptr;
|
||||
}
|
||||
if (code_point_length_in_bytes > m_length)
|
||||
dbgln("Not enough bytes (need {}, have {}), first byte is: {:#02x}, '{}'", code_point_length_in_bytes, m_length, m_ptr[0], (const char*)m_ptr);
|
||||
ASSERT(code_point_length_in_bytes <= m_length);
|
||||
|
||||
for (int offset = 1; offset < code_point_length_in_bytes; offset++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue