From 1638b75eba931ba4c0ca970eb8f8152d92e736d3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 19 Jul 2022 09:55:07 -0400 Subject: Remove Setting::Value type --- src/Configuration.hpp | 4 ++-- src/Setting.hpp | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src') 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 - void set(typename S::Value value) + void set(decltype(S::value) value) { S& setting = std::get(_settings); @@ -66,7 +66,7 @@ public: // Get a global configuration setting template - typename S::Value get() const + const decltype(S::value) get() const { return std::get(_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 struct Setting { - using Value = T; - - Value value{}; + T value{}; }; struct PortColor { -- cgit v1.2.1