diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 16:57:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:57:47 +0100 |
commit | 3e16c3a78fff61c20e63ba730d15e94e3bb877b4 (patch) | |
tree | c070350db219f2c4241d22bc31949685c7b42fe9 /src/util/quicktune.h | |
parent | 5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (diff) | |
parent | 6ccb5835ff55d85156be91473c598eca9d6cb9a6 (diff) | |
download | dragonfireclient-3e16c3a78fff61c20e63ba730d15e94e3bb877b4.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'src/util/quicktune.h')
-rw-r--r-- | src/util/quicktune.h | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/src/util/quicktune.h b/src/util/quicktune.h index 6d47f56df..1943d19c2 100644 --- a/src/util/quicktune.h +++ b/src/util/quicktune.h @@ -52,18 +52,15 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <map> #include <vector> -enum QuicktuneValueType -{ +enum QuicktuneValueType{ QVT_NONE, QVT_FLOAT }; struct QuicktuneValue { QuicktuneValueType type = QVT_NONE; - union - { - struct - { + union{ + struct{ float current; float min; float max; @@ -84,20 +81,18 @@ void setQuicktuneValue(const std::string &name, const QuicktuneValue &val); void updateQuicktuneValue(const std::string &name, QuicktuneValue &val); #ifndef NDEBUG -#define QUICKTUNE(type_, var, min_, max_, name) \ - { \ - QuicktuneValue qv; \ - qv.type = type_; \ - qv.value_##type_.current = var; \ - qv.value_##type_.min = min_; \ - qv.value_##type_.max = max_; \ - updateQuicktuneValue(name, qv); \ - var = qv.value_##type_.current; \ + #define QUICKTUNE(type_, var, min_, max_, name){\ + QuicktuneValue qv;\ + qv.type = type_;\ + qv.value_##type_.current = var;\ + qv.value_##type_.min = min_;\ + qv.value_##type_.max = max_;\ + updateQuicktuneValue(name, qv);\ + var = qv.value_##type_.current;\ } #else // NDEBUG -#define QUICKTUNE(type, var, min_, max_, name) \ - { \ - } + #define QUICKTUNE(type, var, min_, max_, name){} #endif -#define QUICKTUNE_AUTONAME(type_, var, min_, max_) QUICKTUNE(type_, var, min_, max_, #var) +#define QUICKTUNE_AUTONAME(type_, var, min_, max_)\ + QUICKTUNE(type_, var, min_, max_, #var) |