[Bf-blender-cvs] [02739bd] master: Cycles: Cleanup, use "string_" prefix for functions in util_string

Sergey Sharybin noreply at git.blender.org
Thu Jan 7 07:55:07 CET 2016


Commit: 02739bd051744b83aa90097a76d9abf13abac2ca
Author: Sergey Sharybin
Date:   Thu Jan 7 11:47:58 2016 +0500
Branches: master
https://developer.blender.org/rB02739bd051744b83aa90097a76d9abf13abac2ca

Cycles: Cleanup, use "string_" prefix for functions in util_string

No functional changes, just makes it easier to track where the function
is coming from.

===================================================================

M	intern/cycles/device/device.cpp
M	intern/cycles/util/util_string.cpp
M	intern/cycles/util/util_string.h

===================================================================

diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index f3fd462..929f810 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -44,13 +44,13 @@ std::ostream& operator <<(std::ostream &os,
 	/* TODO(sergey): Decode bitflag into list of names. */
 	os << "Nodes features: " << requested_features.nodes_features << std::endl;
 	os << "Use hair: "
-	   << bool_to_string(requested_features.use_hair)  << std::endl;
+	   << string_from_bool(requested_features.use_hair)  << std::endl;
 	os << "Use object motion: "
-	   << bool_to_string(requested_features.use_object_motion)  << std::endl;
+	   << string_from_bool(requested_features.use_object_motion)  << std::endl;
 	os << "Use camera motion: "
-	   << bool_to_string(requested_features.use_camera_motion)  << std::endl;
+	   << string_from_bool(requested_features.use_camera_motion)  << std::endl;
 	os << "Use Baking: "
-	   << bool_to_string(requested_features.use_baking)  << std::endl;
+	   << string_from_bool(requested_features.use_baking)  << std::endl;
 	return os;
 }
 
diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp
index a3b3534..1723528 100644
--- a/intern/cycles/util/util_string.cpp
+++ b/intern/cycles/util/util_string.cpp
@@ -122,7 +122,7 @@ string string_remove_trademark(const string &s)
 	return string_strip(result);
 }
 
-string bool_to_string(bool var)
+string string_from_bool(bool var)
 {
 	if(var)
 		return "True";
diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h
index 2b493a2..b863368 100644
--- a/intern/cycles/util/util_string.h
+++ b/intern/cycles/util/util_string.h
@@ -44,7 +44,7 @@ void string_replace(string& haystack, const string& needle, const string& other)
 bool string_endswith(const string& s, const char *end);
 string string_strip(const string& s);
 string string_remove_trademark(const string& s);
-string bool_to_string(bool var);
+string string_from_bool(const bool var);
 
 CCL_NAMESPACE_END




More information about the Bf-blender-cvs mailing list