return false;
}
+
+bool
+is_child_context (Context *me, Context *child)
+{
+ while (child && child != me)
+ {
+ child = child->daddy_context_;
+ }
+
+ return child == me;
+}
+
/*
move to context of child iterator if it is deeper down in the
hierarchy.
Music_iterator::descend_to_child (Context * child_report)
{
Context * me_report = get_outlet ();
-
- Context * c = child_report;
- while (c && c != me_report)
- {
- c = c->daddy_context_;
- }
-
- if (c == me_report)
+ if (is_child_context (me_report, child_report))
set_translator (child_report);
}