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:
authorCampbell Barton <ideasman42@gmail.com>2015-05-12 23:10:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-12 23:10:49 +0300
commite4cd4c383f13eb9705d9f5d3536c0b2b72e727bd (patch)
treea96e9ad9cc93b360e4e0d04145508c7ad4c577fc /source/blender/depsgraph
parent3160740421cfef1cee61478baadddd256af2dfca (diff)
Cleanup: style
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/depsgraph.h2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc7
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build_nodes.cc14
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build_relations.cc22
-rw-r--r--source/blender/depsgraph/intern/depsgraph_debug.cc10
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc20
-rw-r--r--source/blender/depsgraph/intern/depsgraph_types.h2
-rw-r--r--source/blender/depsgraph/intern/depsnode.h2
-rw-r--r--source/blender/depsgraph/util/depsgraph_util_function.h2
-rw-r--r--source/blender/depsgraph/util/depsgraph_util_pchanmap.h4
10 files changed, 44 insertions, 41 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index 8ce73626c13..0232410b958 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -72,7 +72,7 @@ struct DepsRelation {
DepsNode *to; /* B */
/* relationship attributes */
- const char* name; /* label for debugging */
+ const char *name; /* label for debugging */
eDepsRelation_Type type; /* type */
int flag; /* (eDepsRelation_Flag) */
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index b5e09db6507..15b8cc0fb3a 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -178,7 +178,7 @@ string deg_fcurve_id_name(const FCurve *fcu)
static void deg_graph_build_finalize(Depsgraph *graph)
{
- std::stack<OperationDepsNode*> stack;
+ std::stack<OperationDepsNode *> stack;
for (Depsgraph::OperationNodes::const_iterator it_op = graph->operations.begin();
it_op != graph->operations.end();
@@ -192,8 +192,9 @@ static void deg_graph_build_finalize(Depsgraph *graph)
++it_rel)
{
DepsRelation *rel = *it_rel;
- if (rel->from->type == DEPSNODE_TYPE_OPERATION &&
- (rel->flag & DEPSREL_FLAG_CYCLIC) == 0) {
+ if ((rel->from->type == DEPSNODE_TYPE_OPERATION) &&
+ (rel->flag & DEPSREL_FLAG_CYCLIC) == 0)
+ {
++node->num_links_pending;
}
}
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
index a55fb900551..02538d92480 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -124,7 +124,7 @@ RootDepsNode *DepsgraphNodeBuilder::add_root_node()
IDDepsNode *DepsgraphNodeBuilder::add_id_node(ID *id)
{
const char *idtype_name = BKE_idcode_to_name(GS(id->name));
- return m_graph->add_id_node(id, string(id->name+2) + "[" + idtype_name + "]");
+ return m_graph->add_id_node(id, string(id->name + 2) + "[" + idtype_name + "]");
}
TimeSourceDepsNode *DepsgraphNodeBuilder::add_time_source(ID *id)
@@ -404,8 +404,8 @@ void DepsgraphNodeBuilder::build_object(Scene *scene, Base *base, Object *ob)
id_node->eval_flags |= DAG_EVAL_NEED_CURVE_PATH;
}
}
+ break;
}
- break;
case OB_ARMATURE: /* Pose */
if (ob->id.lib != NULL && ob->proxy_from != NULL) {
@@ -972,8 +972,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
DEPSOP_TYPE_INIT, function_bind(BKE_mesh_eval_geometry, _1, (Mesh *)obdata),
DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
+ break;
}
- break;
case OB_MBALL:
{
@@ -987,8 +987,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
DEPSOP_TYPE_INIT, function_bind(BKE_mball_eval_geometry, _1, (MetaBall *)obdata),
DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
}
+ break;
}
- break;
case OB_CURVE:
case OB_FONT:
@@ -1003,8 +1003,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
DEPSOP_TYPE_EXEC, function_bind(BKE_curve_eval_path, _1, (Curve *)obdata),
DEG_OPCODE_GEOMETRY_PATH, "Path");
+ break;
}
- break;
case OB_SURF: /* Nurbs Surface */
{
@@ -1012,8 +1012,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
DEPSOP_TYPE_INIT, function_bind(BKE_curve_eval_geometry, _1, (Curve *)obdata),
DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
+ break;
}
- break;
case OB_LATTICE: /* Lattice */
{
@@ -1021,8 +1021,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
DEPSOP_TYPE_INIT, function_bind(BKE_lattice_eval_geometry, _1, (Lattice *)obdata),
DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
+ break;
}
- break;
}
add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
index 300ed07de56..b9248318814 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
@@ -399,8 +399,8 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
case OB_LATTICE:
{
build_obdata_geom(bmain, scene, ob);
+ break;
}
- break;
case OB_ARMATURE: /* Pose */
@@ -446,8 +446,8 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
{
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
add_relation(parent_key, ob_key, DEPSREL_TYPE_STANDARD, "Armature Deform Parent");
+ break;
}
- break;
case PARVERT1: /* Vertex Parent */
case PARVERT3:
@@ -459,15 +459,15 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
ComponentKey transform_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
add_relation(transform_key, ob_key, DEPSREL_TYPE_TRANSFORM, "Vertex Parent TFM");
+ break;
}
- break;
case PARBONE: /* Bone Parent */
{
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_BONE, ob->parsubstr);
add_relation(parent_key, ob_key, DEPSREL_TYPE_TRANSFORM, "Bone Parent");
+ break;
}
- break;
default:
{
@@ -502,8 +502,8 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
add_relation(parent_key, ob_key, DEPSREL_TYPE_TRANSFORM, "Parent");
}
+ break;
}
- break;
}
/* exception case: parent is duplivert */
@@ -696,7 +696,7 @@ void DepsgraphRelationBuilder::build_animdata(ID *id)
/* prevent driver from occurring before own animation... */
if (adt->action || adt->nla_tracks.first) {
add_relation(adt_key, driver_key, DEPSREL_TYPE_OPERATION,
- "[AnimData Before Drivers]");
+ "[AnimData Before Drivers]");
}
}
}
@@ -1249,7 +1249,7 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
// TODO: the bigggest point here is that we need the curve PATH and not just the general geometry...
ComponentKey target_key(&data->tar->id, DEPSNODE_TYPE_GEOMETRY);
ComponentKey pose_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE);
- add_relation(target_key, pose_key, DEPSREL_TYPE_TRANSFORM,"[Curve.Path -> Spline IK] DepsRel");
+ add_relation(target_key, pose_key, DEPSREL_TYPE_TRANSFORM, "[Curve.Path -> Spline IK] DepsRel");
}
pchan->flag |= POSE_DONE;
@@ -1595,8 +1595,8 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
ComponentKey mom_key(&mom->id, DEPSNODE_TYPE_GEOMETRY);
add_relation(geom_key, mom_key, DEPSREL_TYPE_GEOMETRY_EVAL, "Metaball Motherball");
}
+ break;
}
- break;
case OB_CURVE:
case OB_FONT:
@@ -1619,18 +1619,18 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
add_relation(textoncurve_key, geom_key, DEPSREL_TYPE_GEOMETRY_EVAL, "Text on Curve");
}
}
+ break;
}
- break;
case OB_SURF: /* Nurbs Surface */
{
+ break;
}
- break;
case OB_LATTICE: /* Lattice */
{
+ break;
}
- break;
}
/* ShapeKeys */
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc
index c876640b462..7c044980d7f 100644
--- a/source/blender/depsgraph/intern/depsgraph_debug.cc
+++ b/source/blender/depsgraph/intern/depsgraph_debug.cc
@@ -917,14 +917,16 @@ DepsgraphStatsID *DepsgraphDebug::get_id_stats(ID *id, bool create)
return id_stats;
}
-DepsgraphStatsComponent *DepsgraphDebug::get_component_stats(DepsgraphStatsID *id_stats,
- const string &name,
- bool create)
+DepsgraphStatsComponent *DepsgraphDebug::get_component_stats(
+ DepsgraphStatsID *id_stats,
+ const string &name,
+ bool create)
{
DepsgraphStatsComponent *comp_stats;
for (comp_stats = (DepsgraphStatsComponent *)id_stats->components.first;
comp_stats != NULL;
- comp_stats = comp_stats->next) {
+ comp_stats = comp_stats->next)
+ {
if (STREQ(comp_stats->name, name.c_str()))
break;
}
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 2f8cdfc1fd5..8549fce6aed 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -152,7 +152,7 @@ void DEG_id_tag_update(ID *id, short flag)
void DEG_id_tag_update_ex(Main *bmain, ID *id, short flag)
{
- if(id == NULL) {
+ if (id == NULL) {
/* Ideally should not happen, but old depsgraph allowed this. */
return;
}
@@ -173,14 +173,14 @@ void DEG_id_tag_update_ex(Main *bmain, ID *id, short flag)
continue;
}
if (flag & OB_RECALC_DATA && GS(id->name) == ID_OB) {
- Object *object = (Object*)id;
+ Object *object = (Object *)id;
if (object->data != NULL) {
DEG_graph_id_tag_update(bmain,
graph,
- (ID*)object->data);
+ (ID *)object->data);
}
}
- if (flag & (OB_RECALC_OB|OB_RECALC_DATA)) {
+ if (flag & (OB_RECALC_OB | OB_RECALC_DATA)) {
DEG_graph_id_tag_update(bmain, graph, id);
}
}
@@ -210,7 +210,7 @@ void DEG_id_type_tag(Main *bmain, short idtype)
/* FIFO queue for tagged nodes that need flushing */
/* XXX This may get a dedicated implementation later if needed - lukas */
-typedef std::queue<OperationDepsNode*> FlushQueue;
+typedef std::queue<OperationDepsNode *> FlushQueue;
/* Flush updates from tagged nodes outwards until all affected nodes are tagged. */
void DEG_graph_flush_updates(Main *bmain, Depsgraph *graph)
@@ -317,9 +317,9 @@ void DEG_graph_flush_updates(Main *bmain, Depsgraph *graph)
*/
void DEG_ids_flush_tagged(Main *bmain)
{
- for (Scene *scene = (Scene*)bmain->scene.first;
+ for (Scene *scene = (Scene *)bmain->scene.first;
scene != NULL;
- scene = (Scene*)scene->id.next)
+ scene = (Scene *)scene->id.next)
{
/* TODO(sergey): Only visible scenes? */
if (scene->depsgraph != NULL) {
@@ -417,9 +417,9 @@ void DEG_graph_on_visible_update(Main *bmain, Scene *scene)
void DEG_on_visible_update(Main *bmain, const bool UNUSED(do_time))
{
- for (Scene *scene = (Scene*)bmain->scene.first;
+ for (Scene *scene = (Scene *)bmain->scene.first;
scene != NULL;
- scene = (Scene*)scene->id.next)
+ scene = (Scene *)scene->id.next)
{
if (scene->depsgraph != NULL) {
DEG_graph_on_visible_update(bmain, scene);
@@ -440,7 +440,7 @@ void DEG_ids_check_recalc(Main *bmain, Scene *scene, bool time)
a = set_listbasepointers(bmain, lbarray);
while (a--) {
ListBase *lb = lbarray[a];
- ID *id = (ID*)lb->first;
+ ID *id = (ID *)lb->first;
/* We tag based on first ID type character to avoid
* looping over all ID's in case there are no tags.
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index 2a84f4587af..713fec8965d 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -53,7 +53,7 @@ struct FCurve;
/* Evaluation Operation for atomic operation */
// XXX: move this to another header that can be exposed?
-typedef function<void(struct EvaluationContext*)> DepsEvalOperationCb;
+typedef function<void(struct EvaluationContext *)> DepsEvalOperationCb;
/* Metatype of Nodes - The general "level" in the graph structure the node serves */
typedef enum eDepsNode_Class {
diff --git a/source/blender/depsgraph/intern/depsnode.h b/source/blender/depsgraph/intern/depsnode.h
index 067bd771e87..993bb6971e7 100644
--- a/source/blender/depsgraph/intern/depsnode.h
+++ b/source/blender/depsgraph/intern/depsnode.h
@@ -168,7 +168,7 @@ struct IDDepsNode : public DepsNode {
};
typedef unordered_map<ComponentIDKey,
- ComponentDepsNode*,
+ ComponentDepsNode *,
component_key_hash> ComponentMap;
void init(const ID *id, const string &subdata);
diff --git a/source/blender/depsgraph/util/depsgraph_util_function.h b/source/blender/depsgraph/util/depsgraph_util_function.h
index 0f5582812f1..976a9d6cc2b 100644
--- a/source/blender/depsgraph/util/depsgraph_util_function.h
+++ b/source/blender/depsgraph/util/depsgraph_util_function.h
@@ -59,7 +59,7 @@ public:
function() {};
function(void *) {}
operator bool() const { return false; }
- bool operator== (void*) { return false; }
+ bool operator== (void *) { return false; }
template<typename T1>
void operator() (T1) {
diff --git a/source/blender/depsgraph/util/depsgraph_util_pchanmap.h b/source/blender/depsgraph/util/depsgraph_util_pchanmap.h
index 5d27d84c0da..82ec8654bc5 100644
--- a/source/blender/depsgraph/util/depsgraph_util_pchanmap.h
+++ b/source/blender/depsgraph/util/depsgraph_util_pchanmap.h
@@ -24,8 +24,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef ___DEPSGRAPH_UTIL_PCHANMAP_H__
-#define ___DEPSGRAPH_UTIL_PCHANMAP_H__
+#ifndef __DEPSGRAPH_UTIL_PCHANMAP_H__
+#define __DEPSGRAPH_UTIL_PCHANMAP_H__
struct RootPChanMap {
/* ctor and dtor - Create and free the internal map respectively. */