From aea9a4ef6bee5b259118ceed660349e30dfdc285 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Mon, 1 Apr 2019 22:30:31 +0200 Subject: Replace IS_NAN with std::isnan (exists since C++11) --- src/desktop-style.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/desktop-style.cpp') diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index d008b0b68..6c8095d53 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -458,7 +458,7 @@ stroke_average_width (const std::vector &objects) double width = item->style->stroke_width.computed * i2dt.descrim(); - if ( item->style->stroke.isNone() || IS_NAN(width)) { + if ( item->style->stroke.isNone() || std::isnan(width)) { ++n_notstroked; // do not count nonstroked objects continue; } else { @@ -775,7 +775,7 @@ objects_query_strokewidth (const std::vector &objects, SPStyle *style_r Geom::Affine i2d = item->i2dt_affine(); double sw = style->stroke_width.computed * i2d.descrim(); - if (!IS_NAN(sw)) { + if (!std::isnan(sw)) { if (prev_sw != -1 && fabs(sw - prev_sw) > 1e-3) same_sw = false; prev_sw = sw; @@ -1068,7 +1068,7 @@ objects_query_fontnumbers (const std::vector &objects, SPStyle *style_r double doc_scale = Geom::Affine(item->i2dt_affine()).descrim(); double dummy = style->font_size.computed * doc_scale; - if (!IS_NAN(dummy)) { + if (!std::isnan(dummy)) { size += dummy; /// \todo FIXME: we assume non-% units here } else { no_size++; @@ -1811,7 +1811,7 @@ objects_query_blur (const std::vector &objects, SPStyle *style_res) if (spblur) { float num = spblur->stdDeviation.getNumber(); float dummy = num * i2d.descrim(); - if (!IS_NAN(dummy)) { + if (!std::isnan(dummy)) { blur_sum += dummy; if (blur_prev != -1 && fabs (num - blur_prev) > 1e-2) // rather low tolerance because difference in blur radii is much harder to notice than e.g. difference in sizes same_blur = false; -- cgit v1.2.3