From 59ec43d9b88dc50f2860b0171f0e4c43e90ee290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 8 Jun 2018 16:43:46 +0200 Subject: Fix const in newly added functions. --- plugingui/humanizerframecontent.cc | 4 ++-- plugingui/humanizerframecontent.h | 4 ++-- plugingui/timingframecontent.cc | 8 ++++---- plugingui/timingframecontent.h | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'plugingui') diff --git a/plugingui/humanizerframecontent.cc b/plugingui/humanizerframecontent.cc index 51725d6..b074746 100644 --- a/plugingui/humanizerframecontent.cc +++ b/plugingui/humanizerframecontent.cc @@ -82,12 +82,12 @@ HumanizerframeContent::HumanizerframeContent(Widget* parent, this, &HumanizerframeContent::stddevKnobValueChanged); } -float HumanizerframeContent::stddevSettingsToKnob(float value) +float HumanizerframeContent::stddevSettingsToKnob(float value) const { return (value - 0.5f) / 3.0f; } -float HumanizerframeContent::stddevKnobToSettings(float value) +float HumanizerframeContent::stddevKnobToSettings(float value) const { return value * 3.0f + 0.5f; } diff --git a/plugingui/humanizerframecontent.h b/plugingui/humanizerframecontent.h index 1fdc83c..2cf708d 100644 --- a/plugingui/humanizerframecontent.h +++ b/plugingui/humanizerframecontent.h @@ -46,8 +46,8 @@ public: SettingsNotifier& settings_notifier); private: - float stddevSettingsToKnob(float value); - float stddevKnobToSettings(float value); + float stddevSettingsToKnob(float value) const; + float stddevKnobToSettings(float value) const; void attackValueChanged(float value); void falloffValueChanged(float value); diff --git a/plugingui/timingframecontent.cc b/plugingui/timingframecontent.cc index 3a29c6b..5e48423 100644 --- a/plugingui/timingframecontent.cc +++ b/plugingui/timingframecontent.cc @@ -86,7 +86,7 @@ TimingframeContent::TimingframeContent(Widget* parent, } -float TimingframeContent::thightnessKnobToSettings(float value) +float TimingframeContent::thightnessKnobToSettings(float value) const { value -= 1.0f; value *= -1.0f; @@ -95,7 +95,7 @@ float TimingframeContent::thightnessKnobToSettings(float value) return value; } -float TimingframeContent::tightnessSettingsToKnob(float value) +float TimingframeContent::tightnessSettingsToKnob(float value) const { value /= 500.0f; value *= -1.0f; @@ -104,7 +104,7 @@ float TimingframeContent::tightnessSettingsToKnob(float value) return value; } -float TimingframeContent::laidbackKnobToSettings(float value) +float TimingframeContent::laidbackKnobToSettings(float value) const { value -= 0.5f; value *= 2.0f; @@ -113,7 +113,7 @@ float TimingframeContent::laidbackKnobToSettings(float value) return std::lround(value); } -float TimingframeContent::laidbackSettingsToKnob(int int_value) +float TimingframeContent::laidbackSettingsToKnob(int int_value) const { float value = int_value; value /= (float)settings.latency_max.load(); diff --git a/plugingui/timingframecontent.h b/plugingui/timingframecontent.h index dc2ad8b..011b288 100644 --- a/plugingui/timingframecontent.h +++ b/plugingui/timingframecontent.h @@ -51,10 +51,10 @@ public: SettingsNotifier& settings_notifier); private: - float thightnessKnobToSettings(float value); - float tightnessSettingsToKnob(float value); - float laidbackKnobToSettings(float value); - float laidbackSettingsToKnob(int int_value); + float thightnessKnobToSettings(float value) const; + float tightnessSettingsToKnob(float value) const; + float laidbackKnobToSettings(float value) const; + float laidbackSettingsToKnob(int int_value) const; void tightnessKnobValueChanged(float value); void tightnessSettingsValueChanged(float value); -- cgit v1.2.3