Dear all,

I just uploaded Knut's patch (with minor reformatting, to obey the 
80-char-per-line limit) to Rietveld; see
  https://codereview.appspot.com/313240043
The corresponding issue can be found at
https://sourceforge.net/p/testlilyissues/issues/5018/

I missed the warnings hidden by the attached patch (they were masked by some 
other code
in my private git tree).

cu,
 Knut

>From 50d9ab59c3c332578f338ea5ff01427a4ae553e8 Mon Sep 17 00:00:00 2001
From: Knut Petersen <knut_peter...@t-online.de>
Date: Fri, 23 Dec 2016 23:44:30 +0100
Subject: [PATCH] Lyric autoextenders: Silence some warnings

The warnings are caused by "" and more unusual constructs.

Signed-off-by: Knut Petersen <knut_peter...@t-online.de>
---
 lily/self-alignment-interface.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lily/self-alignment-interface.cc b/lily/self-alignment-interface.cc
index 512f970e0e..f204f2a810 100644
--- a/lily/self-alignment-interface.cc
+++ b/lily/self-alignment-interface.cc
@@ -59,7 +59,7 @@ Self_alignment_interface::aligned_on_self (Grob *me, Axis a, bool pure, int star
       // However, empty extent and non-empty stencil would be suspicious.
       if (!ext.is_empty ())
         return scm_from_double (- ext.linear_combination (scm_to_double (align)));
-      else if (me->get_stencil ())
+      else if (me->get_stencil () && me->name() != "LyricText")
         warning (me->name () + " has empty extent and non-empty stencil.");
     }
   return scm_from_double (0.0);
@@ -141,7 +141,7 @@ Self_alignment_interface::aligned_on_parent (Grob *me, Axis a)
       // However, empty extent and non-empty stencil would be suspicious.
       if (!ext.is_empty ())
         x -= ext.linear_combination (scm_to_double (self_align));
-      else if (me->get_stencil ())
+      else if (me->get_stencil () && me->name() != "LyricText")
         warning (me->name () + " has empty extent and non-empty stencil.");
     }
 
@@ -150,7 +150,7 @@ Self_alignment_interface::aligned_on_parent (Grob *me, Axis a)
       // See comment above.
       if (!he.is_empty ())
         x += he.linear_combination (scm_to_double (par_align));
-      else if (him->get_stencil ())
+      else if (him->get_stencil () && him->name() != "LyricText")
         warning (him->name () + " has empty extent and non-empty stencil.");
     }
 
-- 
2.11.0

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to