mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 19:27:36 +00:00
LibDSP: Get rid of DeprecatedString
This was a rather easy change, since only parameter names make use of strings in the first place. This also improves OOM resistance: If we can't create a parameter name, we will just set it to the empty string.
This commit is contained in:
parent
8a50c967b8
commit
76b71fcb75
7 changed files with 27 additions and 27 deletions
|
@ -15,7 +15,7 @@ ProcessorParameterWidget::ProcessorParameterWidget(DSP::ProcessorParameter& raw_
|
|||
: m_parameter(raw_parameter)
|
||||
{
|
||||
set_layout<GUI::VerticalBoxLayout>();
|
||||
m_label = add<GUI::Label>(raw_parameter.name());
|
||||
m_label = add<GUI::Label>(raw_parameter.name().to_deprecated_string());
|
||||
switch (raw_parameter.type()) {
|
||||
case DSP::ParameterType::Range: {
|
||||
auto& parameter = static_cast<DSP::ProcessorRangeParameter&>(raw_parameter);
|
||||
|
|
|
@ -26,7 +26,7 @@ ProcessorParameterSlider::ProcessorParameterSlider(Orientation orientation, DSP:
|
|||
set_value(value_log);
|
||||
set_step((min_log - max_log) / slider_steps);
|
||||
}
|
||||
set_tooltip(m_parameter.name());
|
||||
set_tooltip(m_parameter.name().to_deprecated_string());
|
||||
m_value_label->set_text(DeprecatedString::formatted("{:.2f}", static_cast<double>(m_parameter)));
|
||||
|
||||
on_change = [this](auto value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue