diff options
author | Dan Eble <nine.fierce.ballads@gmail.com> | 2015-05-01 22:21:43 -0400 |
---|---|---|
committer | Dan Eble <nine.fierce.ballads@gmail.com> | 2015-05-22 22:23:26 -0400 |
commit | 0c14539bc83d6bb405141b6f21430b33d1e8fcf0 (patch) | |
tree | e662f6f5dc73fccbba2297f7fdfc877caf0338bf /lily/dynamic-align-engraver.cc | |
parent | e52c5d72fc45e123c8574803ba52871e6fe8a596 (diff) |
Issue 4365: non-member unsmob<T> replaces T::unsmob and T::is_smob
Hide Smob_base<>::is_smob() to prevent the misleading situation of
D::is_smob(S) returning true when S represents an ancestor of D rather
than a D. This issue was previously worked around by overriding
is_smob in several derived smob classes; that is no longer needed.
LY_ASSERT_SMOB() now returns a smob pointer. This is not used yet,
but is available for future use to avoid unsmobbing twice.
Smob_base<>::smob_p() is hidden because there doesn't seem to be a
need for it to be public.
Files in lily/include were edited by hand. Files in lily itself were
processed with the following sed script.
s/\([A-Za-z_]\+\)::derived_unsmob/unsmob<\1>/g
s/derived_unsmob *<\([A-Za-z_]\+\)>/unsmob<\1>/g
s/\([A-Za-z_]\+\)::unsmob/unsmob<\1>/g
s/\([A-Za-z_]\+\)::is_smob/unsmob<\1>/g
s/Input \*\([A-Za-z_]\+\) = unsmob /Input *\1 = unsmob<Input> /g
s/LY_ASSERT_SMOB (\([^)]*\))$/LY_ASSERT_SMOB (\1);/g
Diffstat (limited to 'lily/dynamic-align-engraver.cc')
-rw-r--r-- | lily/dynamic-align-engraver.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lily/dynamic-align-engraver.cc b/lily/dynamic-align-engraver.cc index df5c24cb33..4a443dec5c 100644 --- a/lily/dynamic-align-engraver.cc +++ b/lily/dynamic-align-engraver.cc @@ -181,7 +181,7 @@ Dynamic_align_engraver::set_spanner_bounds (Spanner *line, bool end) bound = spanners[0]->get_bound (d); else { - bound = Grob::unsmob (get_property ("currentMusicalColumn")); + bound = unsmob<Grob> (get_property ("currentMusicalColumn")); programming_error ("started DynamicLineSpanner but have no left bound"); } |