summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-25 03:11:42 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-10-25 03:11:42 +0200
commit0a1a0e9df00f37a210b67a11cf8f99550cafeeaf (patch)
tree35da3c9a2d6464025dc324647253966d4a63a351 /options
parenta4c9807acacc87f323f31d252a37c0ed2029ee5b (diff)
cleanups only
Diffstat (limited to 'options')
-rw-r--r--options/bundle.cpp3
-rw-r--r--options/metatype.cpp4
-rw-r--r--options/scoped.cpp4
-rw-r--r--options/value.hpp38
4 files changed, 24 insertions, 25 deletions
diff --git a/options/bundle.cpp b/options/bundle.cpp
index 0ab50037..7347dc88 100644
--- a/options/bundle.cpp
+++ b/options/bundle.cpp
@@ -99,7 +99,7 @@ bool bundle::contains(const QString &name) const
void bundle::save()
{
- if (QThread::currentThread() != qApp->thread())
+ if (QThread::currentThread() != qApp->thread()) // NOLINT
qDebug() << "group::save - current thread not ui thread";
if (group_name.isEmpty())
@@ -112,7 +112,6 @@ void bundle::save()
saved.save();
}
- qDebug() << "saving" << name();
emit saving();
}
diff --git a/options/metatype.cpp b/options/metatype.cpp
index 44f30187..a4629aa6 100644
--- a/options/metatype.cpp
+++ b/options/metatype.cpp
@@ -20,9 +20,9 @@ int declare_metatype_for_type(const char* str)
OPENTRACK_DEFINE_METATYPE4(t, init_metatype_ ## ctr)
#define OPENTRACK_DEFINE_METATYPE4(t, sym) \
- class sym { \
+ class sym { /* NOLINT */ \
static const int dribble; \
- } sym; \
+ } sym; /* NOLINT */ \
const int sym :: dribble = ::options::detail::declare_metatype_for_type<t>(#t);
#define OPENTRACK_DEFINE_METATYPE(t) OPENTRACK_DEFINE_METATYPE2(t, __COUNTER__)
diff --git a/options/scoped.cpp b/options/scoped.cpp
index 2974dfdb..8f1ef202 100644
--- a/options/scoped.cpp
+++ b/options/scoped.cpp
@@ -27,10 +27,10 @@ static void ensure_thread()
{
// only as a bug check
- if (qApp == nullptr)
+ if (qApp == nullptr) // NOLINT
abort();
- const QThread* ui_thread = qApp->thread();
+ const QThread* ui_thread = qApp->thread(); // NOLINT
const QThread* curthread = QThread::currentThread();
if (ui_thread == nullptr)
diff --git a/options/value.hpp b/options/value.hpp
index 1bf6820d..a1ef5734 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -17,7 +17,7 @@
#include "compat/macros.hpp"
#include <type_traits>
-#include <typeinfo>
+#include <utility>
#include <QMetaType>
@@ -94,7 +94,7 @@ public:
cc_noinline
value(bundle b, const QString& name, t def) :
- value_(b, name), def(def)
+ value_(b, name), def(std::move(def))
{
}
@@ -110,7 +110,7 @@ public:
*this = def;
}
- operator t() const { return get(); }
+ operator t() const { return get(); } // NOLINT
template<typename w, typename = decltype(static_cast<w>(std::declval<t>()))>
explicit cc_forceinline operator w() const { return to<w>(); }
@@ -135,21 +135,21 @@ public:
# define OTR_INST_VALUE OTR_TEMPLATE_IMPORT
#endif
-OTR_INST_VALUE(value<double>);
-OTR_INST_VALUE(value<float>);
-OTR_INST_VALUE(value<int>);
-OTR_INST_VALUE(value<bool>);
-OTR_INST_VALUE(value<QString>);
-OTR_INST_VALUE(value<slider_value>);
-OTR_INST_VALUE(value<QPointF>);
-OTR_INST_VALUE(value<QVariant>);
-OTR_INST_VALUE(value<QList<double>>);
-OTR_INST_VALUE(value<QList<float>>);
-OTR_INST_VALUE(value<QList<int>>);
-OTR_INST_VALUE(value<QList<bool>>);
-OTR_INST_VALUE(value<QList<QString>>);
-OTR_INST_VALUE(value<QList<slider_value>>);
-OTR_INST_VALUE(value<QList<QPointF>>);
-OTR_INST_VALUE(value<QList<QVariant>>);
+OTR_INST_VALUE(value<double>)
+OTR_INST_VALUE(value<float>)
+OTR_INST_VALUE(value<int>)
+OTR_INST_VALUE(value<bool>)
+OTR_INST_VALUE(value<QString>)
+OTR_INST_VALUE(value<slider_value>)
+OTR_INST_VALUE(value<QPointF>)
+OTR_INST_VALUE(value<QVariant>)
+OTR_INST_VALUE(value<QList<double>>)
+OTR_INST_VALUE(value<QList<float>>)
+OTR_INST_VALUE(value<QList<int>>)
+OTR_INST_VALUE(value<QList<bool>>)
+OTR_INST_VALUE(value<QList<QString>>)
+OTR_INST_VALUE(value<QList<slider_value>>)
+OTR_INST_VALUE(value<QList<QPointF>>)
+OTR_INST_VALUE(value<QList<QVariant>>)
} // ns options