simon-git: puzzles (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Fri Apr 10 08:07:00 BST 2015


TL;DR:
  7f64f4a Sort out abs/fabs confusion.

Repository:     git://git.tartarus.org/simon/puzzles.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=puzzles.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-04-10 08:07:00

commit 7f64f4a50e46304b7bad011a1251e146ab63ca15
web diff http://tartarus.org/~simon-git/gitweb/?p=puzzles.git;a=commitdiff;h=7f64f4a50e46304b7bad011a1251e146ab63ca15;hp=10460d1bc7dab94e84c5fbbde221c3d20f9e263b
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Apr 10 07:55:16 2015 +0100

    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     |    2 +-
 signpost.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



More information about the tartarus-commits mailing list