diff options
author | André Nusser <andre.nusser@googlemail.com> | 2018-06-08 16:43:46 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2018-06-08 16:43:46 +0200 |
commit | 59ec43d9b88dc50f2860b0171f0e4c43e90ee290 (patch) | |
tree | 22a6550c775d7951512d44069faad6a854767310 | |
parent | 42003bd802d868182bf040e86f2cf2773b8ee851 (diff) |
Fix const in newly added functions.
-rw-r--r-- | plugingui/humanizerframecontent.cc | 4 | ||||
-rw-r--r-- | plugingui/humanizerframecontent.h | 4 | ||||
-rw-r--r-- | plugingui/timingframecontent.cc | 8 | ||||
-rw-r--r-- | plugingui/timingframecontent.h | 8 |
4 files changed, 12 insertions, 12 deletions
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); |