chiark / gitweb /
Sort out abs/fabs confusion.
authorSimon Tatham <anakin@pobox.com>
Fri, 10 Apr 2015 06:55:16 +0000 (07:55 +0100)
committerSimon Tatham <anakin@pobox.com>
Fri, 10 Apr 2015 06:58:26 +0000 (07:58 +0100)
commit7f64f4a50e46304b7bad011a1251e146ab63ca15
tree23e91a703c0c5bb2883a710a93d76830877ec56a
parent10460d1bc7dab94e84c5fbbde221c3d20f9e263b
Sort out abs/fabs confusion.

My Mac has just upgraded itself to include a version of clang which
warns if you use abs() on a floating-point value, or fabs() on an
integer. Fixed the two occurrences that came up in this build (and
which were actual build failures, because of -Werror), one in each
direction.

I think both were benign. The potentially dangerous one was using abs
in place of fabs in grid_find_incentre(), because that could actually
lose precision, but I think that function had plenty of precision to
spare (grid point separation being of the order of tens of pixels) so
nothing should have gone seriously wrong with the old code.
grid.c
signpost.c