aboutsummaryrefslogtreecommitdiff
path: root/src/quicktune.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-17 22:19:39 +0200
committerGitHub <noreply@github.com>2017-08-17 22:19:39 +0200
commit921151d97a2fb2238ab514324fb95e2732248b96 (patch)
tree0723ab1f2c4df22492b4c2221d2974020d4dfd3d /src/quicktune.h
parentc738d1eeabbbe9164a25f6b69bc7ec1a3b44b051 (diff)
downloadminetest-921151d97a2fb2238ab514324fb95e2732248b96.tar.gz
minetest-921151d97a2fb2238ab514324fb95e2732248b96.tar.bz2
minetest-921151d97a2fb2238ab514324fb95e2732248b96.zip
C++ modernize: Pragma once (#6264)
* Migrate cpp headers to pragma once
Diffstat (limited to 'src/quicktune.h')
-rw-r--r--src/quicktune.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/quicktune.h b/src/quicktune.h
index 566fbfc4d..1659e09f1 100644
--- a/src/quicktune.h
+++ b/src/quicktune.h
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Eg. if you have this constant somewhere that you just can't get right
by changing it and recompiling all over again:
v3f wield_position = v3f(55, -35, 65);
-
+
Make it look like this:
v3f wield_position = v3f(55, -35, 65);
QUICKTUNE_AUTONAME(QVT_FLOAT, wield_position.X, 0, 100);
@@ -35,19 +35,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
keymap_quicktune_next
keymap_quicktune_dec
keymap_quicktune_inc
-
+
Once you have modified the values at runtime and then quit, the game
will print out all the modified values at the end:
Modified quicktune values:
wield_position.X = 60
wield_position.Y = -30
wield_position.Z = 65
-
+
The QUICKTUNE macros shouldn't generally be left in committed code.
*/
-#ifndef QUICKTUNE_HEADER
-#define QUICKTUNE_HEADER
+#pragma once
#include <string>
#include <map>
@@ -99,6 +98,3 @@ void updateQuicktuneValue(const std::string &name, QuicktuneValue &val);
#define QUICKTUNE_AUTONAME(type_, var, min_, max_)\
QUICKTUNE(type_, var, min_, max_, #var)
-
-#endif
-