diff options
Diffstat (limited to 'options')
-rw-r--r-- | options/bundle.hpp | 10 | ||||
-rw-r--r-- | options/group.cpp | 4 | ||||
-rw-r--r-- | options/group.hpp | 8 | ||||
-rw-r--r-- | options/slider.hpp | 2 | ||||
-rw-r--r-- | options/value.hpp | 22 |
5 files changed, 23 insertions, 23 deletions
diff --git a/options/bundle.hpp b/options/bundle.hpp index 9b7b7f02..3ab6f74a 100644 --- a/options/bundle.hpp +++ b/options/bundle.hpp @@ -63,12 +63,12 @@ signals: void saving() const; void changed() const; public: - never_inline bundle(const QString& group_name); - never_inline ~bundle() override; + cc_noinline bundle(const QString& group_name); + cc_noinline ~bundle() override; QString name() const { return group_name; } - never_inline void store_kv(const QString& name, const QVariant& datum); - never_inline bool contains(const QString& name) const; - never_inline bool is_modified() const; + cc_noinline void store_kv(const QString& name, const QVariant& datum); + cc_noinline bool contains(const QString& name) const; + cc_noinline bool is_modified() const; template<typename t> t get(const QString& name) const diff --git a/options/group.cpp b/options/group.cpp index 69378d51..77773744 100644 --- a/options/group.cpp +++ b/options/group.cpp @@ -190,7 +190,7 @@ std::shared_ptr<QSettings> group::cur_global_settings_object() return cur_global_ini; } -never_inline +cc_noinline group::saver_::~saver_() { if (--refcount == 0 && modifiedp) @@ -202,7 +202,7 @@ group::saver_::~saver_() } } -never_inline +cc_noinline group::saver_::saver_(QSettings& s, int& refcount, bool& modifiedp) : s(s), refcount(refcount), modifiedp(modifiedp) { diff --git a/options/group.hpp b/options/group.hpp index c933b134..c3fce892 100644 --- a/options/group.hpp +++ b/options/group.hpp @@ -38,8 +38,8 @@ class OTR_OPTIONS_EXPORT group final int& refcount; bool& modifiedp; - never_inline ~saver_(); - never_inline saver_(QSettings& s, int& refcount, bool& modifiedp); + cc_noinline ~saver_(); + cc_noinline saver_(QSettings& s, int& refcount, bool& modifiedp); }; static std::shared_ptr<QSettings> cur_settings_object(); static std::shared_ptr<QSettings> cur_global_settings_object(); @@ -60,7 +60,7 @@ public: static void mark_ini_modified(); template<typename t> - never_inline + cc_noinline t get(const QString& k) const { auto value = kvs.find(k); @@ -70,7 +70,7 @@ public: } template<typename F> - never_inline + cc_noinline static auto with_settings_object(F&& fun) { QMutexLocker l(&cur_ini_mtx); diff --git a/options/slider.hpp b/options/slider.hpp index 7570ace0..958214ce 100644 --- a/options/slider.hpp +++ b/options/slider.hpp @@ -32,7 +32,7 @@ namespace options {} template<typename t> - never_inline + cc_noinline explicit operator arith_conversion_t<t>() const { return t(cur_); diff --git a/options/value.hpp b/options/value.hpp index 47a4d631..42e72e50 100644 --- a/options/value.hpp +++ b/options/value.hpp @@ -42,7 +42,7 @@ class value final : public base_value return val1.value<stored_type>() == val2.value<stored_type>(); } - never_inline + cc_noinline t get() const { if (self_name.isEmpty()) @@ -59,7 +59,7 @@ class value final : public base_value } public: - never_inline + cc_noinline t operator=(const t& datum) { if (self_name.isEmpty()) @@ -74,7 +74,7 @@ public: static constexpr inline Qt::ConnectionType DIRECT_CONNTYPE = Qt::DirectConnection; static constexpr inline Qt::ConnectionType SAFE_CONNTYPE = Qt::QueuedConnection; - never_inline + cc_noinline value(bundle b, const QString& name, t def) : base_value(b, name, &is_equal, std::type_index(typeid(stored_type))), def(def) @@ -91,49 +91,49 @@ public: static_assert(k > 0, ""); } - never_inline + cc_noinline t default_value() const { return def; } - never_inline + cc_noinline void set_to_default() override { *this = def; } - never_inline + cc_noinline operator t() const { return get(); } - never_inline + cc_noinline t operator->() const { return get(); } - never_inline + cc_noinline void reload() override { if (!self_name.isEmpty()) *this = static_cast<t>(*this); } - never_inline + cc_noinline void bundle_value_changed() const override { if (!self_name.isEmpty()) emit valueChanged(traits::to_storage(get())); } - never_inline + cc_noinline t operator()() const { return get(); } template<typename u> - never_inline + cc_noinline u to() const { return static_cast<u>(get()); |