fix gdal compile with msvs 2013 - closes #2257

This commit is contained in:
Dane Springmeyer 2014-08-25 17:50:45 -07:00
parent 6bdb2ebbf1
commit 3e1ab9beab
2 changed files with 3 additions and 5 deletions

View file

@ -112,7 +112,7 @@ inline void read_double_xdr(const char* data, double & val)
std::memcpy(&val,&bits,8); std::memcpy(&val,&bits,8);
} }
#ifdef _WINDOWS #if defined(_MSC_VER) && _MSC_VER < 1800
// msvc doesn't have rint in <cmath> // msvc doesn't have rint in <cmath>
inline int rint(double val) inline int rint(double val)
{ {
@ -123,7 +123,9 @@ inline double round(double val)
{ {
return std::floor(val); return std::floor(val);
} }
#endif
#if defined(_MSC_VER)
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
#ifndef M_PI #ifndef M_PI
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846

View file

@ -48,10 +48,6 @@ using mapnik::geometry_type;
using mapnik::datasource_exception; using mapnik::datasource_exception;
using mapnik::feature_factory; using mapnik::feature_factory;
#ifdef _WINDOWS
using mapnik::rint;
#endif
gdal_featureset::gdal_featureset(GDALDataset& dataset, gdal_featureset::gdal_featureset(GDALDataset& dataset,
int band, int band,
gdal_query q, gdal_query q,