mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
Calculator: Convert DeprecatedString to String
This commit is contained in:
parent
9677d8eeac
commit
6b72fc0924
4 changed files with 10 additions and 10 deletions
|
@ -121,10 +121,10 @@ void Keypad::set_to_0()
|
|||
m_state = State::External;
|
||||
}
|
||||
|
||||
DeprecatedString Keypad::to_deprecated_string() const
|
||||
ErrorOr<String> Keypad::to_string() const
|
||||
{
|
||||
if (m_state == State::External || m_state == State::TypedExternal)
|
||||
return m_internal_value.to_deprecated_string(m_displayed_fraction_length);
|
||||
return String::from_deprecated_string(m_internal_value.to_deprecated_string(m_displayed_fraction_length));
|
||||
|
||||
StringBuilder builder;
|
||||
|
||||
|
@ -142,7 +142,7 @@ DeprecatedString Keypad::to_deprecated_string() const
|
|||
builder.append(frac_value);
|
||||
}
|
||||
|
||||
return builder.to_deprecated_string();
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
bool Keypad::in_typing_state() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue