summaryrefslogtreecommitdiff
path: root/lily/paper-column-engraver.cc
diff options
context:
space:
mode:
authorDan Eble <nine.fierce.ballads@gmail.com>2015-05-01 22:21:43 -0400
committerDan Eble <nine.fierce.ballads@gmail.com>2015-05-22 22:23:26 -0400
commit0c14539bc83d6bb405141b6f21430b33d1e8fcf0 (patch)
treee662f6f5dc73fccbba2297f7fdfc877caf0338bf /lily/paper-column-engraver.cc
parente52c5d72fc45e123c8574803ba52871e6fe8a596 (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/paper-column-engraver.cc')
-rw-r--r--lily/paper-column-engraver.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/lily/paper-column-engraver.cc b/lily/paper-column-engraver.cc
index b92abe8171..87df2cbe59 100644
--- a/lily/paper-column-engraver.cc
+++ b/lily/paper-column-engraver.cc
@@ -98,7 +98,7 @@ Paper_column_engraver::make_columns ()
void
Paper_column_engraver::initialize ()
{
- system_ = derived_unsmob<System> (get_property ("rootSystem"));
+ system_ = unsmob<System> (get_property ("rootSystem"));
make_columns ();
system_->set_bound (LEFT, command_column_);
@@ -214,7 +214,7 @@ Paper_column_engraver::process_music ()
if (start_of_measure)
{
Moment mlen = Moment (measure_length (context ()));
- Grob *column = Grob::unsmob (get_property ("currentCommandColumn"));
+ Grob *column = unsmob<Grob> (get_property ("currentCommandColumn"));
if (column)
column->set_property ("measure-length", mlen.smobbed_copy ());
else
@@ -239,7 +239,7 @@ Paper_column_engraver::stop_translation_timestep ()
if (!elem->get_parent (X_AXIS))
elem->set_parent (col, X_AXIS);
- if (!Grob::is_smob (elem->get_object ("axis-group-parent-X")))
+ if (!unsmob<Grob> (elem->get_object ("axis-group-parent-X")))
elem->set_object ("axis-group-parent-X", col->self_scm ());
if (Accidental_placement::has_interface (elem)
@@ -280,7 +280,7 @@ Paper_column_engraver::stop_translation_timestep ()
SCM mpos = get_property ("measurePosition");
SCM barnum = get_property ("internalBarNumber");
- if (Moment::is_smob (mpos)
+ if (unsmob<Moment> (mpos)
&& scm_is_integer (barnum))
{
SCM where = scm_cons (barnum,