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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-06-08 13:15:24 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-06-08 13:15:24 +0300
commit6a546fc73e00a8064c7c483f0af558d37a8a7f0a (patch)
tree3031a52c976e32f7c97825cf7a5a2c5e8f6335c6 /intern/cycles/util/util_string.cpp
parent45d3e2220488e5b4c09c58bedd07c5340462b941 (diff)
Cycles: Don't leave multiple spaces in the device name
Diffstat (limited to 'intern/cycles/util/util_string.cpp')
-rw-r--r--intern/cycles/util/util_string.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp
index a1008d510d1..94ad512982c 100644
--- a/intern/cycles/util/util_string.cpp
+++ b/intern/cycles/util/util_string.cpp
@@ -148,6 +148,12 @@ void string_replace(string& haystack, const string& needle, const string& other)
string string_remove_trademark(const string &s)
{
string result = s;
+
+ /* Special case, so we don;t leave sequential spaces behind. */
+ /* TODO(sergey): Consider using regex perhaps? */
+ string_replace(result, " (TM)", "");
+ string_replace(result, " (R)", "");
+
string_replace(result, "(TM)", "");
string_replace(result, "(R)", "");