summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-19 09:55:07 -0400
committerDavid Robillard <d@drobilla.net>2022-07-20 10:35:32 -0400
commit1638b75eba931ba4c0ca970eb8f8152d92e736d3 (patch)
tree9c12964060ada4fa8b1a5d5b04bf1ffbe2709f55
parent4658288c09861a2c222636e7844f773fef43bab7 (diff)
downloadpatchage-1638b75eba931ba4c0ca970eb8f8152d92e736d3.tar.gz
patchage-1638b75eba931ba4c0ca970eb8f8152d92e736d3.tar.bz2
patchage-1638b75eba931ba4c0ca970eb8f8152d92e736d3.zip
Remove Setting<T>::Value type
-rw-r--r--src/Configuration.hpp4
-rw-r--r--src/Setting.hpp4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/Configuration.hpp b/src/Configuration.hpp
index 9c9142d..cf99ad1 100644
--- a/src/Configuration.hpp
+++ b/src/Configuration.hpp
@@ -54,7 +54,7 @@ public:
// Set a global configuration setting
template<class S>
- void set(typename S::Value value)
+ void set(decltype(S::value) value)
{
S& setting = std::get<S>(_settings);
@@ -66,7 +66,7 @@ public:
// Get a global configuration setting
template<class S>
- typename S::Value get() const
+ const decltype(S::value) get() const
{
return std::get<S>(_settings).value;
}
diff --git a/src/Setting.hpp b/src/Setting.hpp
index 9720ba2..f8864d0 100644
--- a/src/Setting.hpp
+++ b/src/Setting.hpp
@@ -16,9 +16,7 @@ namespace setting {
template<class T>
struct Setting {
- using Value = T;
-
- Value value{};
+ T value{};
};
struct PortColor {