1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 19:05:06 +00:00

AK: Allow setting both width and precision when formatting a string

This commit is contained in:
Timothy Flynn 2021-07-17 18:04:59 -04:00 committed by Gunnar Beutner
parent df5fa8aa39
commit 06ddfcde89
2 changed files with 3 additions and 2 deletions

View file

@ -550,8 +550,6 @@ void Formatter<StringView>::format(FormatBuilder& builder, StringView value)
VERIFY_NOT_REACHED();
if (m_mode != Mode::Default && m_mode != Mode::String && m_mode != Mode::Character && m_mode != Mode::HexDump)
VERIFY_NOT_REACHED();
if (m_width.has_value() && m_precision.has_value())
VERIFY_NOT_REACHED();
m_width = m_width.value_or(0);
m_precision = m_precision.value_or(NumericLimits<size_t>::max());