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/simple-spacer.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/simple-spacer.cc')
-rw-r--r-- | lily/simple-spacer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index ada16593aa..271c1521c5 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -380,7 +380,7 @@ get_column_description (vector<Grob *> const &cols, vsize col_index, bool line_s for (SCM s = Spaceable_grob::get_minimum_distances (col); scm_is_pair (s); s = scm_cdr (s)) { - Grob *other = Grob::unsmob (scm_caar (s)); + Grob *other = unsmob<Grob> (scm_caar (s)); vsize j = binary_search (cols, other, Paper_column::less_than, col_index); if (j != VPOS) { |