[GRASS-git] [OSGeo/grass] a946ca: cmake support preparation: use of INFINITY and NAN...

Markus Neteler noreply at github.com
Mon Jan 16 05:54:04 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: a946ca6bb7da6721617a43cf94ae4f67edc5d416
      https://github.com/OSGeo/grass/commit/a946ca6bb7da6721617a43cf94ae4f67edc5d416
  Author: Markus Neteler <neteler at gmail.com>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    M general/g.region/printwindow.c
    M lib/btree2/kdtree.c
    M lib/gmath/la.c
    M lib/vector/Vlib/box.c
    M raster/r.horizon/main.c
    M raster/r.in.bin/main.c
    M raster/r.in.lidar/info.c
    M raster/r.in.pdal/info.cpp
    M raster/r.in.xyz/main.c
    M raster/r.li/r.li.padrange/padrange.c
    M raster/r.out.gdal/main.c
    M raster/r.series.accumulate/main.c
    M raster/r.series/main.c
    M raster/r.univar/r.univar_main.c
    M raster/r.univar/r3.univar_main.c
    M raster/r.univar/stats.c
    M raster3d/r3.in.lidar/info.c
    M vector/v.cluster/main.c
    M vector/v.distance/distance.c
    M vector/v.univar/main.c
    M vector/v.voronoi/skeleton.c

  Log Message:
  -----------
  cmake support preparation: use of INFINITY and NAN (#2681)

* cmake support preparation: use of INFINITY and NAN

- use of `INFINITY` rather than only division by zero (this is supported by gcc and other compilers but not on Windows)
- use of `NAN` rather than only division by zero

Extracted from WIP PR #289

Further changes on top:

- fix indentation
- revert void* arithmetic change
- remove superfluous comments
- use 0 (zero) to init integers
- 0/0 = NAN, 1/0 = INFINITY
- Include math.h for Windows
- Use c++ include
- r.series: add INFINITY
- apply clang-format to match reformatting in `main` by using `for i in $(gh pr view 2681 --json files --jq '.files.[].path') ; do clang-format -i $i ; done`

Co-authored-by: @rkanavath
Co-authored-by: @nilason




More information about the grass-commit mailing list