summaryrefslogtreecommitdiff
blob: 3df44286e23c947bd0d11dc567ab922327e9c121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From: Stephane Mankowski <stephane@mankowski.fr>
Date: Wed, 24 Feb 2016 14:07:00 +0000
Subject: Building the v2.3.0 package on Arch Linux dies with an error 'isnan' was not declared in this scope
X-Git-Url: http://quickgit.kde.org/?p=skrooge.git&a=commitdiff&h=dacb104d4c803679be744c198c70a871c2078dd0
---
Building the v2.3.0 package on Arch Linux dies with an error 'isnan' was not declared in this scope
BUG:359679
---


--- a/plugins/import/skrooge_import_gnc/skgimportplugingnc.cpp
+++ b/plugins/import/skrooge_import_gnc/skgimportplugingnc.cpp
@@ -27,7 +27,6 @@
 
 #include <qdom.h>
 #include <qfileinfo.h>
-#include <math.h>
 #include <cmath>
 
 #include "skgtraces.h"
@@ -36,11 +35,6 @@
 #include "skgobjectbase.h"
 #include "skgpayeeobject.h"
 #include "skgimportexportmanager.h"
-
-#ifdef Q_OS_WIN
-#define isnan(a) _isnan(a)
-#define isinf(a) !_finite(a)
-#endif
 
 /**
  * This plugin factory.
@@ -386,7 +380,7 @@
                                         }
                                     }
 
-                                    if (!isnan(info.value)) {
+                                    if (!std::isnan(info.value)) {
                                         QChar accountType = mapIdType[info.account.text()];
                                         if (accountType == 'C') {
                                             suboperationsList.push_front(info);

--- a/skgbasemodeler/skgdocument.cpp
+++ b/skgbasemodeler/skgdocument.cpp
@@ -42,7 +42,6 @@
 #include <qurl.h>
 
 #include <sqlite3.h>
-#include <math.h>
 #include <cmath>
 
 #include "skgtraces.h"
@@ -51,11 +50,6 @@
 #include "skgpropertyobject.h"
 #include "skgtransactionmng.h"
 #include "skgreport.h"
-
-#ifdef Q_OS_WIN
-#define isnan(a) _isnan(a)
-#define isinf(a) !_finite(a)
-#endif
 
 #ifdef SKGCIPHER
 #define SQLDRIVERNAME QStringLiteral("SKGSQLCIPHER")
@@ -2693,7 +2687,7 @@
     if (iValue > 0) {
         p = '+' % p;
     }
-    if (p.count() > 10 || isnan(iValue) || isinf(iValue)) {
+    if (p.count() > 10 || std::isnan(iValue) || std::isinf(iValue)) {
         p = QChar(8734);
     }
     return "<font color=\"" %