Am 02.07.2016 um 20:15 schrieb Richard Heck:

All harmless.

In future, you can fix these sorts of warnings easily.

I understand the compiler warnings but it is not easy for me to decide if a truncation of values was intended or not. I mean if it is intended one should use int(). Since this is not done, I must assume that this was not intended.

int const y_bar = deleted() ? y - fm.maxAscent() / 3
        : y + 2 * pi.base.solidLineOffset() + pi.base.solidLineThickness();

Here, we clearly do want to do that, since the function to which we're about to
pass y_bar wants an int, too.

That is not clear to me. How can I know that we want to floor the result of a division. Do we really want to get 2 if fm.maxAscent() is either 6, 7 or 8? That is quite strange to me. Another question arises if we want the truncation: why do we divide by 3 not e.g. 4?

That is why I report the warnings uncommented. It might be that it is obvious for others but for me they are not.

Since you know the background of the truncation, could you please apply the fixes?

thanks and regards
Uwe

Reply via email to