[Bf-blender-cvs] [f2b4a59be61] blender2.8: Depsgraph: Cleanup, no explicit usage of std in code
Sergey Sharybin
noreply at git.blender.org
Thu Nov 9 11:27:00 CET 2017
Commit: f2b4a59be61e555a3813f1a31799f09affc5237e
Author: Sergey Sharybin
Date: Thu Nov 9 11:23:44 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBf2b4a59be61e555a3813f1a31799f09affc5237e
Depsgraph: Cleanup, no explicit usage of std in code
Code is supposed to be pure-C-ish with some C++-ism. All specifics are to be
handled in header files.
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M source/blender/depsgraph/intern/depsgraph_types.h
===================================================================
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 58c9b6f10ca..2da753d7313 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -405,7 +405,7 @@ void DepsgraphNodeBuilder::build_object(Object *ob,
/* Skip rest of components if the ID node was already there. */
if (ob->id.tag & LIB_TAG_DOIT) {
IDDepsNode *id_node = find_id_node(&ob->id);
- id_node->linked_state = std::max(id_node->linked_state, linked_state);
+ id_node->linked_state = max(id_node->linked_state, linked_state);
return;
}
ob->id.tag |= LIB_TAG_DOIT;
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index a3d3863621b..7f68220f3fa 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -53,8 +53,10 @@ struct FCurve;
namespace DEG {
+/* TODO(sergey): Find a better place for this. */
using std::string;
using std::vector;
+using std::max;
/* Evaluation Operation for atomic operation */
// XXX: move this to another header that can be exposed?
@@ -80,7 +82,8 @@ typedef enum eDepsNode_Class {
} eDepsNode_Class;
/* Note: We use max comparison to mark an id node that is linked more than once
- * So keep this enum ordered accordingly. */
+ * So keep this enum ordered accordingly.
+ */
typedef enum eDepsNode_LinkedState_Type {
/* Generic indirectly linked id node. */
DEG_ID_LINKED_INDIRECTLY = 0,
More information about the Bf-blender-cvs
mailing list