summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-11-19 21:18:01 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-11-20 00:51:14 +0100
commit6947bed015c33706b9a441fd47cd84f0da99097c (patch)
treef5069ae2bbdbc29f65366807ad5e217e3c293fa8 /core
parentecf80fbbbadaa782cbe81a6562916331c6762970 (diff)
downloadredot-engine-6947bed015c33706b9a441fd47cd84f0da99097c.tar.gz
Pass engine name and version parts as proper strings
Removes the need for _MKSTR all over the place which has the drawback of converting _MKSTR(UNKNOWN_DEFINE) to "UKNOWN_DEFINE" instead of throwing a compilation error.
Diffstat (limited to 'core')
-rw-r--r--core/engine.cpp6
-rw-r--r--core/os/os.cpp2
-rw-r--r--core/version.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/core/engine.cpp b/core/engine.cpp
index 31abcd62ef..9a3c6248a8 100644
--- a/core/engine.cpp
+++ b/core/engine.cpp
@@ -84,11 +84,11 @@ Dictionary Engine::get_version_info() const {
#else
dict["patch"] = 0;
#endif
- dict["status"] = _MKSTR(VERSION_STATUS);
- dict["revision"] = _MKSTR(VERSION_REVISION);
+ dict["status"] = VERSION_STATUS;
+ dict["revision"] = VERSION_REVISION;
dict["year"] = VERSION_YEAR;
- String hash = String(VERSION_HASH);
+ String hash = VERSION_HASH;
dict["hash"] = hash.length() == 0 ? String("unknown") : hash;
String stringver = String(dict["major"]) + "." + String(dict["minor"]);
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 8d050c1c4c..65d0b2e05d 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -279,7 +279,7 @@ String OS::get_safe_application_name() const {
String OS::get_godot_dir_name() const {
// Default to lowercase, so only override when different case is needed
- return String(_MKSTR(VERSION_SHORT_NAME)).to_lower();
+ return String(VERSION_SHORT_NAME).to_lower();
}
// OS equivalent of XDG_DATA_HOME
diff --git a/core/version.h b/core/version.h
index 7d2c47df6a..01c251c113 100644
--- a/core/version.h
+++ b/core/version.h
@@ -30,8 +30,8 @@
#include "version_generated.gen.h"
#ifdef VERSION_PATCH
-#define VERSION_MKSTRING "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) "." _MKSTR(VERSION_PATCH) "." _MKSTR(VERSION_STATUS) "." _MKSTR(VERSION_REVISION) VERSION_MODULE_CONFIG
+#define VERSION_MKSTRING "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) "." _MKSTR(VERSION_PATCH) "." VERSION_STATUS "." VERSION_REVISION VERSION_MODULE_CONFIG
#else
-#define VERSION_MKSTRING "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) "." _MKSTR(VERSION_STATUS) "." _MKSTR(VERSION_REVISION) VERSION_MODULE_CONFIG
+#define VERSION_MKSTRING "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) "." VERSION_STATUS "." VERSION_REVISION VERSION_MODULE_CONFIG
#endif // VERSION_PATCH
-#define VERSION_FULL_NAME "" _MKSTR(VERSION_NAME) " v" VERSION_MKSTRING
+#define VERSION_FULL_NAME "" VERSION_NAME " v" VERSION_MKSTRING