From 52f67dee52a484e8a2eed0c527777c1d341a2294 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 26 Jul 2015 09:29:10 +0200 Subject: qfc: abstract away internally-used data type Also, change value_type to more sensible value --- qfunctionconfigurator/functionconfig.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'qfunctionconfigurator/functionconfig.h') diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h index a8b46597..446c73ac 100644 --- a/qfunctionconfigurator/functionconfig.h +++ b/qfunctionconfigurator/functionconfig.h @@ -18,16 +18,17 @@ class Map { private: + static constexpr int value_count = 5000; + using num = float; + struct State { QList input; - std::vector data; + std::vector data; }; - static constexpr int value_count = 9001; - int precision() const; void reload(); - float getValueInternal(int x); + num getValueInternal(int x); MyMutex _mutex; QPointF last_input_value; @@ -46,7 +47,7 @@ public: setMaxOutput(maxy); } - float getValue(float x); + num getValue(num x); bool getLastPoint(QPointF& point); void removePoint(int i); void removeAllPoints() { -- cgit v1.2.3