From 591f47d6a9e62ab50e56985e8ecf238a6f5b8de3 Mon Sep 17 00:00:00 2001 From: Gabriel Ozouf Date: Wed, 2 Dec 2020 15:09:57 +0100 Subject: [PATCH] [continuous_function_cache] Coding style --- apps/shared/continuous_function.h | 2 +- apps/shared/continuous_function_cache.cpp | 2 +- apps/shared/function.cpp | 2 +- apps/shared/function.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/shared/continuous_function.h b/apps/shared/continuous_function.h index 8b270fcec..3d9aa8dd0 100644 --- a/apps/shared/continuous_function.h +++ b/apps/shared/continuous_function.h @@ -90,7 +90,7 @@ private: typedef Poincare::Coordinate2D (*ComputePointOfInterest)(Poincare::Expression e, char * symbol, double start, double step, double max, Poincare::Context * context); Poincare::Coordinate2D nextPointOfInterestFrom(double start, double step, double max, Poincare::Context * context, ComputePointOfInterest compute) const; template Poincare::Coordinate2D privateEvaluateXYAtParameter(T t, Poincare::Context * context) const; - void functionBecameInactive() override { m_cache = nullptr; } + void didBecomeInactive() override { m_cache = nullptr; } void fullXYRange(float * xMin, float * xMax, float * yMin, float * yMax, Poincare::Context * context) const; diff --git a/apps/shared/continuous_function_cache.cpp b/apps/shared/continuous_function_cache.cpp index 1c578e44b..00a8cd687 100644 --- a/apps/shared/continuous_function_cache.cpp +++ b/apps/shared/continuous_function_cache.cpp @@ -31,7 +31,7 @@ void ContinuousFunctionCache::PrepareForCaching(void * fun, ContinuousFunctionCa if (function->cache() != cache) { cache->clear(); function->setCache(cache); - } else if (tStep != 0. && tStep != cache->step()) { + } else if (tStep != 0.f && tStep != cache->step()) { cache->clear(); } diff --git a/apps/shared/function.cpp b/apps/shared/function.cpp index 3a8ca6da3..3f3150d6f 100644 --- a/apps/shared/function.cpp +++ b/apps/shared/function.cpp @@ -51,7 +51,7 @@ KDColor Function::color() const { void Function::setActive(bool active) { recordData()->setActive(active); if (!active) { - functionBecameInactive(); + didBecomeInactive(); } } diff --git a/apps/shared/function.h b/apps/shared/function.h index 6f76e940a..3ef12a822 100644 --- a/apps/shared/function.h +++ b/apps/shared/function.h @@ -94,7 +94,7 @@ protected: }; void protectedFullRangeForDisplay(float tMin, float tMax, float tStep, float * min, float * max, Poincare::Context * context, bool xRange) const; - virtual void functionBecameInactive() {} + virtual void didBecomeInactive() {} private: RecordDataBuffer * recordData() const;