summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/functionconfig.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-18 07:24:52 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-18 07:39:58 +0200
commitcf5ab7886e8228d1622566cc59277bcf089199a9 (patch)
tree2f35b7e417a634e8736f5a9a75113aee21ec5b57 /qfunctionconfigurator/functionconfig.cpp
parentf95add4571874c58b35ff4929bcea75dc4080e16 (diff)
cleanup qfc
Issue: #44 Remove confusing logic and retarded comments by the usual offender. Change prototypes a bit for clarity's sake again.
Diffstat (limited to 'qfunctionconfigurator/functionconfig.cpp')
-rw-r--r--qfunctionconfigurator/functionconfig.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp
index 640db1ef..159f350e 100644
--- a/qfunctionconfigurator/functionconfig.cpp
+++ b/qfunctionconfigurator/functionconfig.cpp
@@ -14,7 +14,7 @@
#include <QtAlgorithms>
#include <QtAlgorithms>
#include <QSettings>
-#include <math.h>
+#include <cmath>
#include <QPixmap>
void FunctionConfig::setTrackingActive(bool blnActive)
@@ -156,13 +156,10 @@ void FunctionConfig::movePoint(int idx, QPointF pt) {
}
}
-QList<QPointF> FunctionConfig::getPoints() {
- QList<QPointF> ret;
+const QList<QPointF> FunctionConfig::getPoints() {
QMutexLocker foo(&_mutex);
- for (int i = 0; i < input.size(); i++) {
- ret.append(input[i]);
- }
- return ret;
+ // NB can't pass by reference
+ return input;
}
void FunctionConfig::loadSettings(QSettings& settings, const QString& title) {