summaryrefslogtreecommitdiffhomepage
path: root/options/value.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-06-26 22:53:29 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-06-26 23:05:21 +0200
commit53902262040c77423591ea57ae43ab38cda655dc (patch)
treeadeb6d96449a79a779d19d04a6177f25178bd2bc /options/value.hpp
parent3dc30f8e91ec3fd81c8e68a845632cd5e6a5a77b (diff)
options/value: add missing dereference operator
Diffstat (limited to 'options/value.hpp')
-rw-r--r--options/value.hpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/options/value.hpp b/options/value.hpp
index f1e44677..e73456ca 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -15,7 +15,6 @@
#include "base-value.hpp"
#include "value-traits.hpp"
#include "compat/macros.hpp"
-#include "compat/linkage-macros.hpp"
#include <cstdio>
#include <type_traits>
@@ -85,12 +84,6 @@ public:
DIRECT_CONNTYPE);
}
- template<unsigned k>
- inline value(bundle b, const char (&name)[k], t def) : value(b, QLatin1String(name, k-1), def)
- {
- static_assert(k > 0, "");
- }
-
cc_noinline
t default_value() const
{
@@ -103,10 +96,8 @@ public:
*this = def;
}
- cc_noinline
operator t() const { return get(); }
- cc_noinline
t operator->() const
{
return get();
@@ -126,14 +117,17 @@ public:
emit valueChanged(traits::to_storage(get()));
}
- cc_noinline
t operator()() const
{
return get();
}
+ t operator*() const
+ {
+ return get();
+ }
+
template<typename u>
- cc_noinline
u to() const
{
return static_cast<u>(get());