changeset 32009:a96980ad4b57

octave-svgconvert: Avoid function that isn't available in some versions of Qt. * src/octave-qsvghandler.h (toDouble): Avoid function qFpClassify that appears to be unavailable in some (older) versions of Qt. Use the STL function std::fpclassify instead.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 13 Apr 2023 19:47:59 +0200
parents 4d15e1304a48
children d790c977abb5
files src/octave-qsvghandler.h
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/octave-qsvghandler.h	Thu Apr 13 16:17:45 2023 +0200
+++ b/src/octave-qsvghandler.h	Thu Apr 13 19:47:59 2023 +0200
@@ -47,6 +47,8 @@
 // https://github.com/qt/qtsvg/blob/6.5.0/src/svg/qsvghandler.cpp
 // --------------------------------------------------------------------------
 
+#include <cmath>
+
 #include <QPainterPath>
 
 static inline bool isDigit(ushort ch)
@@ -128,7 +130,7 @@
     } else {
         val = QByteArray::fromRawData(temp, pos).toDouble();
         // Do not tolerate values too wild to be represented normally by floats
-        if (qFpClassify(float(val)) != FP_NORMAL)
+        if (std::fpclassify (float {val}) != FP_NORMAL)
             val = 0;
     }
     return val;