Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/cycles/app/cycles_standalone.cpp2
-rw-r--r--intern/cycles/util/util_version.h17
2 files changed, 7 insertions, 12 deletions
diff --git a/intern/cycles/app/cycles_standalone.cpp b/intern/cycles/app/cycles_standalone.cpp
index 951e8dca677..726e9a51744 100644
--- a/intern/cycles/app/cycles_standalone.cpp
+++ b/intern/cycles/app/cycles_standalone.cpp
@@ -409,7 +409,7 @@ static void options_parse(int argc, const char **argv)
exit(EXIT_SUCCESS);
}
else if(version) {
- printf("%s\n", cycles_version_number().c_str());
+ printf("%s\n", CYCLES_VERSION_STRING);
exit(EXIT_SUCCESS);
}
else if(help || options.filepath == "") {
diff --git a/intern/cycles/util/util_version.h b/intern/cycles/util/util_version.h
index 19847410e51..65918672596 100644
--- a/intern/cycles/util/util_version.h
+++ b/intern/cycles/util/util_version.h
@@ -27,18 +27,13 @@ CCL_NAMESPACE_BEGIN
#define CYCLES_VERSION_MINOR 7
#define CYCLES_VERSION_PATCH 0
-/* Create string number, like "1.7.0" */
-string cycles_version_number()
-{
- stringstream ss;
- ss << CYCLES_VERSION_MAJOR << "."
- << CYCLES_VERSION_MINOR << "."
- << CYCLES_VERSION_PATCH;
-
- return ss.str();
-}
+#define CYCLES_MAKE_VERSION_STRING2(a,b,c) #a "." #b "." #c
+#define CYCLES_MAKE_VERSION_STRING(a,b,c) CYCLES_MAKE_VERSION_STRING2(a,b,c)
+#define CYCLES_VERSION_STRING \
+ CYCLES_MAKE_VERSION_STRING(CYCLES_VERSION_MAJOR, \
+ CYCLES_VERSION_MINOR, \
+ CYCLES_VERSION_PATCH)
CCL_NAMESPACE_END
#endif /* __UTIL_VERSION_H__ */
-