[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Tue Jan 31 22:28:50 CET 2006
SVN commit 504362 by staikos:
Move NOPOINT into .cpp file and use it where NAN was used to make it compile on
solaris (approved by Barth)
M +1 -0 Makefile.am
A kstmath.cpp [License: GPL (v2+)]
M +5 -0 kstmath.h
M +2 -1 kstrvector.cpp
M +0 -6 kstvector.cpp
M +1 -1 kstvector.h
--- trunk/extragear/graphics/kst/kst/Makefile.am #504361:504362
@@ -28,6 +28,7 @@
kstdatacollection.cpp \
kstdebug.cpp \
rwlock.cpp \
+ kstmath.cpp \
kstdateparser.cpp \
ksttimezones.cpp \
kstsettings.cpp \
--- trunk/extragear/graphics/kst/kst/kstmath.h #504361:504362
@@ -29,6 +29,7 @@
#include <ieeefp.h>
#endif
+#include "kst_export.h"
/*
** For systems without NAN, this is a NAN in IEEE double format.
@@ -64,6 +65,10 @@
#endif
+namespace KST {
+KST_EXPORT extern const double NOPOINT;
+}
+
inline int d2i(double x) {
return int(floor(x+0.5));
}
--- trunk/extragear/graphics/kst/kst/kstrvector.cpp #504361:504362
@@ -28,6 +28,7 @@
#include "kstdatacollection.h"
#include "kstdebug.h"
#include "kstrvector.h"
+#include "kstmath.h"
// ReqNF <=0 means read from ReqF0 to end of File
// ReqF0 < means start at EndOfFile-ReqNF.
@@ -578,7 +579,7 @@
// read the new data from file
if (start_past_eof) {
- _v[0] = NAN;
+ _v[0] = KST::NOPOINT;
n_read = 1;
} else if (_file->samplesPerFrame(_field) > 1) {
assert(new_nf - NF - 1 > 0 || new_nf - NF - 1 == -1);
--- trunk/extragear/graphics/kst/kst/kstvector.cpp #504361:504362
@@ -36,12 +36,6 @@
// Use 1 for a simple for() loop
#define ZERO_MEMORY 2
-#ifdef NAN
-double KST::NOPOINT = NAN;
-#else
-double KST::NOPOINT = 0.0/0.0; // NaN
-#endif
-
#define INITSIZE 1
/** Create a vector */
--- trunk/extragear/graphics/kst/kst/kstvector.h #504361:504362
@@ -29,7 +29,7 @@
namespace KST {
// Do not compare against this, only assign it and use the helpers above.
- extern KST_EXPORT double NOPOINT;
+ extern KST_EXPORT const double NOPOINT;
}
namespace Equation {
More information about the Kst
mailing list