summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
Diffstat (limited to 'options')
-rw-r--r--options/bundle.hpp10
-rw-r--r--options/group.hpp4
-rw-r--r--options/value.hpp22
3 files changed, 18 insertions, 18 deletions
diff --git a/options/bundle.hpp b/options/bundle.hpp
index 00f2aed6..b6189ba6 100644
--- a/options/bundle.hpp
+++ b/options/bundle.hpp
@@ -64,12 +64,12 @@ signals:
void saving() const;
void changed() const;
public:
- OTR_NEVER_INLINE bundle(const QString& group_name);
- OTR_NEVER_INLINE ~bundle() override;
+ never_inline bundle(const QString& group_name);
+ never_inline ~bundle() override;
QString name() const { return group_name; }
- OTR_NEVER_INLINE void store_kv(const QString& name, const QVariant& datum);
- OTR_NEVER_INLINE bool contains(const QString& name) const;
- OTR_NEVER_INLINE bool is_modified() const;
+ 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;
template<typename t>
t get(const QString& name) const
diff --git a/options/group.hpp b/options/group.hpp
index b0e13a6a..dd070dfd 100644
--- a/options/group.hpp
+++ b/options/group.hpp
@@ -50,7 +50,7 @@ public:
static void mark_ini_modified();
template<typename t>
- OTR_NEVER_INLINE
+ never_inline
t get(const QString& k) const
{
auto value = kvs.find(k);
@@ -60,7 +60,7 @@ public:
}
template<typename F>
- OTR_NEVER_INLINE
+ never_inline
static auto with_settings_object(F&& fun)
{
saver_ saver { *cur_settings_object(), cur_ini_mtx };
diff --git a/options/value.hpp b/options/value.hpp
index ebb2096c..ba482cf7 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -48,7 +48,7 @@ class value final : public base_value
return val1.value<element_type>() == val2.value<element_type>();
}
- OTR_NEVER_INLINE
+ never_inline
t get() const
{
if (!b->contains(self_name) || b->get<QVariant>(self_name).type() == QVariant::Invalid)
@@ -60,7 +60,7 @@ class value final : public base_value
}
public:
- OTR_NEVER_INLINE
+ never_inline
t operator=(const t& datum)
{
if (datum != get())
@@ -71,7 +71,7 @@ public:
static constexpr const Qt::ConnectionType DIRECT_CONNTYPE = Qt::DirectConnection;
static constexpr const Qt::ConnectionType SAFE_CONNTYPE = Qt::QueuedConnection;
- OTR_NEVER_INLINE
+ never_inline
value(bundle b, const QString& name, t def) :
base_value(b, name, &is_equal, std::type_index(typeid(element_type))),
def(def)
@@ -81,46 +81,46 @@ public:
DIRECT_CONNTYPE);
}
- OTR_NEVER_INLINE
+ never_inline
value(bundle b, const char* name, t def) : value(b, QString(name), def)
{
}
- OTR_NEVER_INLINE
+ never_inline
t default_value() const
{
return def;
}
- OTR_NEVER_INLINE
+ never_inline
void set_to_default() override
{
*this = def;
}
- OTR_NEVER_INLINE
+ never_inline
operator t() const { return std::forward<t>(get()); }
- OTR_NEVER_INLINE
+ never_inline
void reload() override
{
*this = static_cast<t>(*this);
}
- OTR_NEVER_INLINE
+ never_inline
void bundle_value_changed() const override
{
emit valueChanged(traits::to_storage(get()));
}
- OTR_NEVER_INLINE
+ never_inline
t operator()() const
{
return get();
}
template<typename u>
- OTR_NEVER_INLINE
+ never_inline
u to() const
{
return static_cast<u>(std::forward<t>(get()));