[Goodies-dev] [Bug 11604] Remove negative sign when temperature is 0° F

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Fri Mar 6 20:07:29 CET 2015


https://bugzilla.xfce.org/show_bug.cgi?id=11604

--- Comment #12 from Harald Judt <hjudt at xfce.org> ---
Gave it a quick glance. Should work so far and does apply only to the rounded
values, that's fine and correct.

Now just two annotations: Why do an addition of 0.5 instead of simply setting
it to 0? Second, you will have figured out already this is quite repetitive (3x
same code). Could you refactor (move) it to its own function, or maybe a macro
similar to ROUND_TO_INT, let's name it CALC_FAHRENHEIT and it can include the
calculation formula too, val = val * 9.0 / 5.0 + 32.0; ?

If you need other examples, there are a lot of macros defined in
weather-plugin, usually located rather at the top of the files.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Goodies-dev mailing list