diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-09 17:03:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-09 17:03:09 +0300 |
commit | b70f85f2aae977dc361d40b73cf5a110495c6cab (patch) | |
tree | bb6a74051208f5a927ac3c88771af23a9d174935 /intern/cycles/util | |
parent | 2e10c658f42a842404f16a1b03ff4844e41d538c (diff) | |
parent | e20a0798dc6ca38eb4a06dda7948bd1c306d0693 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_string.cpp | 5 | ||||
-rw-r--r-- | intern/cycles/util/util_string.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp index 995f5d3df27..47119e90a45 100644 --- a/intern/cycles/util/util_string.cpp +++ b/intern/cycles/util/util_string.cpp @@ -168,6 +168,11 @@ string string_from_bool(bool var) return "False"; } +string to_string(const char *str) +{ + return string(str); +} + /* Wide char strings helpers for Windows. */ #ifdef _WIN32 diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h index 7dfa97335a9..3a4f4398158 100644 --- a/intern/cycles/util/util_string.h +++ b/intern/cycles/util/util_string.h @@ -29,6 +29,7 @@ using std::string; using std::stringstream; using std::ostringstream; using std::istringstream; +using std::to_string; #ifdef __GNUC__ #define PRINTF_ATTRIBUTE __attribute__((format(printf, 1, 2))) @@ -49,6 +50,7 @@ bool string_endswith(const string& s, const char *end); string string_strip(const string& s); string string_remove_trademark(const string& s); string string_from_bool(const bool var); +string to_string(const char *str); /* Wide char strings are only used on Windows to deal with non-ascii * characters in file names and such. No reason to use such strings |