Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1215)

Unified Diff: lily/pure-from-neighbor-engraver.cc

Issue 344010043: Issue 5336: Remove downcasting methods from Grob_array and Grob_info (Closed)
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/pointer-group-interface.cc ('k') | lily/separating-line-group-engraver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/pure-from-neighbor-engraver.cc
diff --git a/lily/pure-from-neighbor-engraver.cc b/lily/pure-from-neighbor-engraver.cc
index cea3936161c4c62357250ca9ca664b7a00275bcb..805965341d1d102cf72aa7dfaefa438a8f76d789 100644
--- a/lily/pure-from-neighbor-engraver.cc
+++ b/lily/pure-from-neighbor-engraver.cc
@@ -49,8 +49,11 @@ Pure_from_neighbor_engraver::Pure_from_neighbor_engraver (Context *c)
void
Pure_from_neighbor_engraver::acknowledge_item (Grob_info i)
{
- if (!has_interface<Pure_from_neighbor_interface> (i.item ()))
- pure_relevants_.push_back (i.item ());
+ if (Item *item = dynamic_cast<Item *> (i.grob ()))
+ {
+ if (!has_interface<Pure_from_neighbor_interface> (item))
+ pure_relevants_.push_back (item);
+ }
}
bool
@@ -67,7 +70,8 @@ in_same_column (Grob *g1, Grob *g2)
void
Pure_from_neighbor_engraver::acknowledge_pure_from_neighbor (Grob_info i)
{
- need_pure_heights_from_neighbors_.push_back (i.item ());
+ Item *item = dynamic_cast<Item *> (i.grob ());
+ need_pure_heights_from_neighbors_.push_back (item);
}
void
« no previous file with comments | « lily/pointer-group-interface.cc ('k') | lily/separating-line-group-engraver.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b