[continuous_function_cache] Coding style

This commit is contained in:
Gabriel Ozouf
2020-12-02 15:09:57 +01:00
committed by LeaNumworks
parent 937979503a
commit 591f47d6a9
4 changed files with 4 additions and 4 deletions

View File

@@ -90,7 +90,7 @@ private:
typedef Poincare::Coordinate2D<double> (*ComputePointOfInterest)(Poincare::Expression e, char * symbol, double start, double step, double max, Poincare::Context * context);
Poincare::Coordinate2D<double> nextPointOfInterestFrom(double start, double step, double max, Poincare::Context * context, ComputePointOfInterest compute) const;
template <typename T> Poincare::Coordinate2D<T> 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;

View File

@@ -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();
}

View File

@@ -51,7 +51,7 @@ KDColor Function::color() const {
void Function::setActive(bool active) {
recordData()->setActive(active);
if (!active) {
functionBecameInactive();
didBecomeInactive();
}
}

View File

@@ -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;