aboutsummaryrefslogtreecommitdiff
path: root/src/util/quicktune.h
diff options
context:
space:
mode:
authorElias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com>2020-11-04 16:57:47 +0100
committerGitHub <noreply@github.com>2020-11-04 16:57:47 +0100
commit3e16c3a78fff61c20e63ba730d15e94e3bb877b4 (patch)
treec070350db219f2c4241d22bc31949685c7b42fe9 /src/util/quicktune.h
parent5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (diff)
parent6ccb5835ff55d85156be91473c598eca9d6cb9a6 (diff)
downloaddragonfireclient-3e16c3a78fff61c20e63ba730d15e94e3bb877b4.tar.xz
Merge branch 'master' into master
Diffstat (limited to 'src/util/quicktune.h')
-rw-r--r--src/util/quicktune.h33
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)