Permalink
Browse files

Making LibSVF compile with GCC 4.6 (for Ubuntu 12.04)

  • Loading branch information...
1 parent aa2b590 commit 9ebe475d17845a1e57c6664115981b7c3392255e @teqdruid teqdruid committed Jul 30, 2012
Showing with 5 additions and 2 deletions.
  1. +1 −0 svf/svf.hpp
  2. +2 −0 svf/trace.hpp
  3. +2 −2 tests/sparse_vector_tests.cpp
View
@@ -16,6 +16,7 @@
#include <svf/matrix_correlate.hpp>
#include <stdint.h>
+#include <cstdlib>
#include <cassert>
namespace SVF {
View
@@ -11,6 +11,8 @@
#ifndef __SVF_TRACE_HPP__
#define __SVF_TRACE_HPP__
+#include <stdint.h>
+#include <cstdlib>
#include <vector>
#include <cassert>
@@ -107,8 +107,8 @@ class SparseVectorSVFTests: public CPPUNIT_NS::TestCase
struct ScalarDist {
template <typename T>
double operator()(T a, T b) {
- assert(!isnan(a));
- assert(!isnan(b));
+ assert(!std::isnan((T)a));
+ assert(!std::isnan((T)b));
return fabs(a - b);
}
};

0 comments on commit 9ebe475

Please sign in to comment.