diff --git a/apps/graph/graph/graph_controller.cpp b/apps/graph/graph/graph_controller.cpp index 08c4ca80b..caf46381a 100644 --- a/apps/graph/graph/graph_controller.cpp +++ b/apps/graph/graph/graph_controller.cpp @@ -39,7 +39,7 @@ void GraphController::setDisplayDerivativeInBanner(bool displayDerivative) { m_displayDerivativeInBanner = displayDerivative; } -float GraphController::interestingXHalfRange() { +float GraphController::interestingXHalfRange() const { float characteristicRange = 0.0f; TextFieldDelegateApp * myApp = (TextFieldDelegateApp *)app(); for (int i = 0; i < functionStore()->numberOfActiveFunctions(); i++) { diff --git a/apps/graph/graph/graph_controller.h b/apps/graph/graph/graph_controller.h index bdf5ad861..58586d727 100644 --- a/apps/graph/graph/graph_controller.h +++ b/apps/graph/graph/graph_controller.h @@ -20,7 +20,7 @@ public: void viewWillAppear() override; bool displayDerivativeInBanner() const; void setDisplayDerivativeInBanner(bool displayDerivative); - float interestingXHalfRange() override; + float interestingXHalfRange() const override; private: int estimatedBannerNumberOfLines() const override; void selectFunctionWithCursor(int functionIndex) override; diff --git a/apps/sequence/graph/graph_controller.cpp b/apps/sequence/graph/graph_controller.cpp index cd5e42c31..92db25c1a 100644 --- a/apps/sequence/graph/graph_controller.cpp +++ b/apps/sequence/graph/graph_controller.cpp @@ -29,7 +29,7 @@ I18n::Message GraphController::emptyMessage() { return I18n::Message::NoActivatedSequence; } -float GraphController::interestingXMin() { +float GraphController::interestingXMin() const { int nmin = INT_MAX; for (int i = 0; i < m_sequenceStore->numberOfModels(); i++) { Sequence * s = m_sequenceStore->modelAtIndex(i); @@ -41,7 +41,7 @@ float GraphController::interestingXMin() { return nmin; } -float GraphController::interestingXHalfRange() { +float GraphController::interestingXHalfRange() const { float standardRange = Shared::FunctionGraphController::interestingXHalfRange(); int nmin = INT_MAX; int nmax = 0; diff --git a/apps/sequence/graph/graph_controller.h b/apps/sequence/graph/graph_controller.h index 52dedbaae..b8579a776 100644 --- a/apps/sequence/graph/graph_controller.h +++ b/apps/sequence/graph/graph_controller.h @@ -18,8 +18,8 @@ public: I18n::Message emptyMessage() override; TermSumController * termSumController() { return &m_termSumController; } // InteractiveCurveViewRangeDelegate - float interestingXMin() override; - float interestingXHalfRange() override; + float interestingXMin() const override; + float interestingXHalfRange() const override; protected: int numberOfCurves() const override { return m_sequenceStore->numberOfModels(); } private: diff --git a/apps/shared/interactive_curve_view_range_delegate.h b/apps/shared/interactive_curve_view_range_delegate.h index 62ae00a96..b7193ebd1 100644 --- a/apps/shared/interactive_curve_view_range_delegate.h +++ b/apps/shared/interactive_curve_view_range_delegate.h @@ -8,8 +8,8 @@ class InteractiveCurveViewRange; class InteractiveCurveViewRangeDelegate { public: bool didChangeRange(InteractiveCurveViewRange * interactiveCurveViewRange); - virtual float interestingXMin() { return -interestingXHalfRange(); } - virtual float interestingXHalfRange() { return 10.0f; } + virtual float interestingXMin() const { return -interestingXHalfRange(); } + virtual float interestingXHalfRange() const { return 10.0f; } protected: struct Range { float min;