Cycles: Remove explicit std:: from types where possible
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Oct 2016 10:31:11 +0000 (12:31 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Oct 2016 10:31:11 +0000 (12:31 +0200)
We have our own abstraction level on top of the STL's implementation.
This commit will guarantee our tweaks are used for all cases.

intern/cycles/blender/blender_python.cpp
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/device/device.cpp
intern/cycles/graph/node_type.h
intern/cycles/render/mesh_subdivision.cpp

index 0161b5b192c2772a08b618ef914295f901b8a62b..a50f5edb1dfd46a0fe43be5b0592a8a53eeaa96b 100644 (file)
@@ -26,6 +26,7 @@
 #include "util_md5.h"
 #include "util_opengl.h"
 #include "util_path.h"
+#include "util_string.h"
 #include "util_types.h"
 
 #ifdef WITH_OSL
@@ -437,13 +438,13 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args)
                        continue;
 
                /* determine socket type */
-               std::string socket_type;
+               string socket_type;
                BL::NodeSocket::type_enum data_type = BL::NodeSocket::type_VALUE;
                float4 default_float4 = make_float4(0.0f, 0.0f, 0.0f, 1.0f);
                float default_float = 0.0f;
                int default_int = 0;
-               std::string default_string = "";
-               
+               string default_string = "";
+
                if(param->isclosure) {
                        socket_type = "NodeSocketShader";
                        data_type = BL::NodeSocket::type_SHADER;
index 534bc6cc8973ccac0ec9af4d9fe76c80ce0a9610..f63f94ab37a0634ae950660bd2aa64905372accf 100644 (file)
 #include "blender_util.h"
 
 #include "util_debug.h"
+#include "util_string.h"
 
 CCL_NAMESPACE_BEGIN
 
 typedef map<void*, ShaderInput*> PtrInputMap;
 typedef map<void*, ShaderOutput*> PtrOutputMap;
-typedef map<std::string, ConvertNode*> ProxyMap;
+typedef map<string, ConvertNode*> ProxyMap;
 
 /* Find */
 
index b8b9597914e8ad0cfe23726c07caee48aa20d30b..9a01b4f2b6eea9c7c724b2fcb41c9de9ad22da30 100644 (file)
@@ -165,7 +165,7 @@ private:
        id_map<ParticleSystemKey, ParticleSystem> particle_system_map;
        set<Mesh*> mesh_synced;
        set<Mesh*> mesh_motion_synced;
-       std::set<float> motion_times;
+       set<float> motion_times;
        void *world_map;
        bool world_recalc;
 
index 85e736ad6354aa98c4f0fc66c6c7bfd3216a4de5..909ec7a6d60c83f64ae3f899c60ca3cf629432fe 100644 (file)
@@ -49,17 +49,17 @@ 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: "
-          << string_from_bool(requested_features.use_hair)  << std::endl;
+          << string_from_bool(requested_features.use_hair) << std::endl;
        os << "Use object motion: "
-          << string_from_bool(requested_features.use_object_motion)  << std::endl;
+          << string_from_bool(requested_features.use_object_motion) << std::endl;
        os << "Use camera motion: "
-          << string_from_bool(requested_features.use_camera_motion)  << std::endl;
+          << string_from_bool(requested_features.use_camera_motion) << std::endl;
        os << "Use Baking: "
-          << string_from_bool(requested_features.use_baking)  << std::endl;
+          << string_from_bool(requested_features.use_baking) << std::endl;
        os << "Use Subsurface: "
           << string_from_bool(requested_features.use_subsurface) << std::endl;
        os << "Use Volume: "
-          << string_from_bool(requested_features.use_volume)  << std::endl;
+          << string_from_bool(requested_features.use_volume) << std::endl;
        os << "Use Branched Integrator: "
           << string_from_bool(requested_features.use_integrator_branched) << std::endl;
        os << "Use Patch Evaluation: "
index 60c3244028d51803d1382bba2927675b9d66c33f..e89bb5b3c1f4ff0216ca3a9aabd00138e70eca24 100644 (file)
@@ -125,8 +125,8 @@ struct NodeType
 
        ustring name;
        Type type;
-       std::vector<SocketType> inputs;
-       std::vector<SocketType> outputs;
+       vector<SocketType> inputs;
+       vector<SocketType> outputs;
        CreateFunc create;
 
        static NodeType *add(const char *name, CreateFunc create, Type type = NONE);
index 813b23ed91eb01c851873fd181ca22b4c3d1af7c..913c3c74b425ffb14afd28c4f133491211a637cd 100644 (file)
@@ -92,7 +92,7 @@ namespace Far {
 
                        if(vert_edges.size() == 2) {
                                float sharpness = refiner.getLevel(0).getEdgeSharpness(vert_edges[0]);
-                               sharpness = std::min(sharpness, refiner.getLevel(0).getEdgeSharpness(vert_edges[1]));
+                               sharpness = min(sharpness, refiner.getLevel(0).getEdgeSharpness(vert_edges[1]));
 
                                setBaseVertexSharpness(refiner, i, sharpness);
                        }