From 0a1a0e9df00f37a210b67a11cf8f99550cafeeaf Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 25 Oct 2018 03:11:42 +0200 Subject: cleanups only --- options/bundle.cpp | 3 +-- options/metatype.cpp | 4 ++-- options/scoped.cpp | 4 ++-- options/value.hpp | 38 +++++++++++++++++++------------------- 4 files changed, 24 insertions(+), 25 deletions(-) (limited to 'options') 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); #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 -#include +#include #include @@ -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(std::declval()))> explicit cc_forceinline operator w() const { return to(); } @@ -135,21 +135,21 @@ public: # define OTR_INST_VALUE OTR_TEMPLATE_IMPORT #endif -OTR_INST_VALUE(value); -OTR_INST_VALUE(value); -OTR_INST_VALUE(value); -OTR_INST_VALUE(value); -OTR_INST_VALUE(value); -OTR_INST_VALUE(value); -OTR_INST_VALUE(value); -OTR_INST_VALUE(value); -OTR_INST_VALUE(value>); -OTR_INST_VALUE(value>); -OTR_INST_VALUE(value>); -OTR_INST_VALUE(value>); -OTR_INST_VALUE(value>); -OTR_INST_VALUE(value>); -OTR_INST_VALUE(value>); -OTR_INST_VALUE(value>); +OTR_INST_VALUE(value) +OTR_INST_VALUE(value) +OTR_INST_VALUE(value) +OTR_INST_VALUE(value) +OTR_INST_VALUE(value) +OTR_INST_VALUE(value) +OTR_INST_VALUE(value) +OTR_INST_VALUE(value) +OTR_INST_VALUE(value>) +OTR_INST_VALUE(value>) +OTR_INST_VALUE(value>) +OTR_INST_VALUE(value>) +OTR_INST_VALUE(value>) +OTR_INST_VALUE(value>) +OTR_INST_VALUE(value>) +OTR_INST_VALUE(value>) } // ns options -- cgit v1.2.3