lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fixing compiler warnings


From: Werner LEMBERG
Subject: Re: fixing compiler warnings
Date: Sun, 26 Dec 2010 21:07:10 +0100 (CET)

> Are you certain that this is a good change:

> +Font_metric::get_indexed_char_dimensions (size_t) const
>  {
>    return Box (Interval (0, 0), Interval (0, 0));
>  }

Yes, as Han-Wen already mentioned.  Derived classes must provide
something useful.

> I have similar concerns about the argument changes to
> Pango_font::text_stencil and Figured_bass_engraver::listen_rest.

The same as above.  As far as I can see, my compilation fixes don't
hide bugs.  The only potential bug which I've fixed is this:

   if (a)
-    return a > (Rational)0;
+    return a;

since the implicit conversion Rational to integer via `return a' (in
Rational::to_int) is not rounding away from zero but truncating, thus
you would get incorrect results for Rational values in the range ]-1,1[.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]