summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-24 18:54:34 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-24 19:32:10 +0100
commita88e34b21b07f70123926fcb5c505d6afdf99807 (patch)
tree905059194dcc64c7c163b8912947d8173fd4cc91 /logic
parent5bf85412e4eacf92acc936b6e74bce0e2b1055d9 (diff)
style/quality only
No functional changes. - add `override' everywhere where missing - almost pass clang's `-Wweak-vtables' - avoid some float/double conversions - remove unused private members - make signedness conversions explicit - put stuff in right namespaces to aid analysis
Diffstat (limited to 'logic')
-rw-r--r--logic/pipeline.cpp4
-rw-r--r--logic/tracklogger.cpp2
-rw-r--r--logic/tracklogger.hpp2
-rw-r--r--logic/win32-shortcuts.cpp4
4 files changed, 8 insertions, 4 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index 1bde1bb1..4700bcc7 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -119,8 +119,8 @@ Pose reltrans::apply_pipeline(reltrans_state state, const Pose& value,
{
const double dt = interp_timer.elapsed_seconds();
- static constexpr float RC_stages[] = { 2, 1, .5, .1, .05 };
- static constexpr float RC_time_deltas[] = { 1, .25, .25, 2 };
+ static constexpr double RC_stages[] = { 2, 1, .5, .1, .05 };
+ static constexpr double RC_time_deltas[] = { 1, .25, .25, 2 };
interp_timer.start();
diff --git a/logic/tracklogger.cpp b/logic/tracklogger.cpp
index a287b633..758c2478 100644
--- a/logic/tracklogger.cpp
+++ b/logic/tracklogger.cpp
@@ -3,6 +3,8 @@
#include <QMessageBox>
+TrackLogger::~TrackLogger() = default;
+
void TrackLogger::write_pose(const double* p)
{
write(p, 6);
diff --git a/logic/tracklogger.hpp b/logic/tracklogger.hpp
index d6c34157..134a27fd 100644
--- a/logic/tracklogger.hpp
+++ b/logic/tracklogger.hpp
@@ -13,7 +13,7 @@ class OTR_LOGIC_EXPORT TrackLogger
public:
TrackLogger() = default;
- virtual ~TrackLogger() = default;
+ virtual ~TrackLogger();
virtual void write(const char *) {}
virtual void write(const double *, int) {}
diff --git a/logic/win32-shortcuts.cpp b/logic/win32-shortcuts.cpp
index 1e2f1b77..324b1b04 100644
--- a/logic/win32-shortcuts.cpp
+++ b/logic/win32-shortcuts.cpp
@@ -15,6 +15,7 @@
#include <QVariant>
#include <QDebug>
+#if 0
win_key const windows_key_mods[] {
{DIK_LCONTROL, Qt::Key_Control},
{DIK_RCONTROL, Qt::Key_Control},
@@ -25,6 +26,7 @@ win_key const windows_key_mods[] {
{DIK_LWIN, Qt::Key_Super_L},
{DIK_RWIN, Qt::Key_Super_R},
};
+#endif
static const win_key windows_key_sequences[] {
{ DIK_F1, Qt::Key_F1 },
@@ -164,7 +166,7 @@ bool win_key::from_qt(const QKeySequence& qt_, int& dik, Qt::KeyboardModifiers&
#if 0
const unsigned qt = QVariant(qt_).toInt(); // verbose
#endif
- const unsigned qt = int(qt_); // deprecated
+ const unsigned qt = (unsigned)int(qt_); // deprecated
const unsigned our_mods = qt & Qt::KeyboardModifierMask;
if (qt == 0)