[Top][All Lists]
[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
- fixing compiler warnings, Graham Percival, 2010/12/26
- fixing compiler warnings, Graham Percival, 2010/12/26
- Re: fixing compiler warnings,
Werner LEMBERG <=
- Re: fixing compiler warnings, David Kastrup, 2010/12/26
- Re: fixing compiler warnings, Werner LEMBERG, 2010/12/27
- Re: fixing compiler warnings, Reinhold Kainhofer, 2010/12/27
- Re: fixing compiler warnings, Han-Wen Nienhuys, 2010/12/27
- Re: fixing compiler warnings, David Kastrup, 2010/12/27