[Bf-blender-cvs] [af9998d0d8c] temp-sybren-usd-patch-02: USD: rename `link` to `dupli_object` and made variable loop-local
Sybren A. Stüvel
noreply at git.blender.org
Thu Nov 28 17:55:57 CET 2019
Commit: af9998d0d8cd29c9fda834737f64c0015e987656
Author: Sybren A. Stüvel
Date: Tue Nov 26 13:51:09 2019 +0100
Branches: temp-sybren-usd-patch-02
https://developer.blender.org/rBaf9998d0d8cd29c9fda834737f64c0015e987656
USD: rename `link` to `dupli_object` and made variable loop-local
I added an explicit `!= nullptr` to make the formatter put the three parts
of the `for`-statement on three different lines (instead of two), which
increases readability.
===================================================================
M source/blender/usd/intern/abstract_hierarchy_iterator.cc
===================================================================
diff --git a/source/blender/usd/intern/abstract_hierarchy_iterator.cc b/source/blender/usd/intern/abstract_hierarchy_iterator.cc
index d9a23f33aae..4215264c9a0 100644
--- a/source/blender/usd/intern/abstract_hierarchy_iterator.cc
+++ b/source/blender/usd/intern/abstract_hierarchy_iterator.cc
@@ -188,24 +188,26 @@ void AbstractHierarchyIterator::export_graph_construct()
// Export the duplicated objects instanced by this object.
ListBase *lb = object_duplilist(depsgraph_, scene, object);
if (lb) {
- DupliObject *link = nullptr;
-
// Construct the set of duplicated objects, so that later we can determine whether a parent
// is also duplicated itself.
std::set<Object *> dupli_set;
- for (link = static_cast<DupliObject *>(lb->first); link; link = link->next) {
- if (!should_visit_dupli_object(link)) {
+ for (DupliObject *dupli_object = static_cast<DupliObject *>(lb->first);
+ dupli_object != nullptr;
+ dupli_object = dupli_object->next) {
+ if (!should_visit_dupli_object(dupli_object)) {
continue;
}
- dupli_set.insert(link->ob);
+ dupli_set.insert(dupli_object->ob);
}
- for (link = static_cast<DupliObject *>(lb->first); link; link = link->next) {
- if (!should_visit_dupli_object(link)) {
+ for (DupliObject *dupli_object = static_cast<DupliObject *>(lb->first);
+ dupli_object != nullptr;
+ dupli_object = dupli_object->next) {
+ if (!should_visit_dupli_object(dupli_object)) {
continue;
}
- visit_dupli_object(link, object, dupli_set);
+ visit_dupli_object(dupli_object, object, dupli_set);
}
}
More information about the Bf-blender-cvs
mailing list