From: David Kastrup Date: Sat, 27 Apr 2013 12:43:40 +0000 (+0200) Subject: Let Stencil::is_empty use Box::is_empty X-Git-Tag: release/2.17.19-1~5^2~21 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a8ac663bf03c250ea84bc499437ffc8d529fc047;p=lilypond.git Let Stencil::is_empty use Box::is_empty This is a change in semantics as an axis interval of '(1 . -1) is considered empty as an interval, while it is not sufficient for making a box axis empty. Things like backspaces would have similar metrics and are different from no information at all. --- diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc index 37203f4eda..3bc68710ef 100644 --- a/lily/stencil-scheme.cc +++ b/lily/stencil-scheme.cc @@ -180,7 +180,7 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil", "@item\n" "The vertical and horizontal extents of the object, given as" " pairs. If an extent is unspecified (or if you use" - " @code{(1000 . -1000)} as its value), it is taken to be empty.\n" + " @code{empty-interval} as its value), it is taken to be empty.\n" "@end enumerate\n") { SCM_ASSERT_TYPE (!scm_is_pair (expr) diff --git a/lily/stencil.cc b/lily/stencil.cc index 1657481109..833d5be0fd 100644 --- a/lily/stencil.cc +++ b/lily/stencil.cc @@ -66,13 +66,9 @@ Stencil::extent (Axis a) const bool Stencil::is_empty () const -/* If only one of X- or Y-extent is empty; such a stencil can be useful - * for backspacing, as with \hspace #-2, so we do not consider it empty. - */ { return (expr_ == SCM_EOL - || (dim_[X_AXIS].is_empty () - && dim_[Y_AXIS].is_empty ())); + || dim_.is_empty ()); } SCM