diff --git a/include/mapnik/distance.hpp b/include/mapnik/distance.hpp index b1f21121d..5485aa11b 100644 --- a/include/mapnik/distance.hpp +++ b/include/mapnik/distance.hpp @@ -29,7 +29,7 @@ namespace mapnik { - class ellipsoid; + struct ellipsoid; // great-circle distance diff --git a/include/mapnik/map.hpp b/include/mapnik/map.hpp index 089b88a6a..0b721399c 100644 --- a/include/mapnik/map.hpp +++ b/include/mapnik/map.hpp @@ -314,8 +314,8 @@ namespace mapnik featureset_ptr query_map_point(unsigned index, double x, double y) const; ~Map(); - void setAspectFixMode(aspect_fix_mode afm) { aspectFixMode_ = afm; } - bool getAspectFixMode() { return aspectFixMode_; } + inline void setAspectFixMode(aspect_fix_mode afm) { aspectFixMode_ = afm; } + inline int getAspectFixMode() { return aspectFixMode_; } private: void fixAspectRatio(); diff --git a/include/mapnik/value.hpp b/include/mapnik/value.hpp index 5717ce221..082bd9dfb 100644 --- a/include/mapnik/value.hpp +++ b/include/mapnik/value.hpp @@ -96,13 +96,13 @@ namespace mapnik { bool operator() (double lhs, int rhs) const { - return lhs == rhs; + return (lhs == rhs)? true : false ; } bool operator() (UnicodeString const& lhs, UnicodeString const& rhs) const { - return lhs == rhs; + return (lhs == rhs) ? true: false; } bool operator() (value_null, value_null) const @@ -139,7 +139,7 @@ namespace mapnik { bool operator() (UnicodeString const& lhs, UnicodeString const& rhs) const { - return lhs != rhs; + return (lhs != rhs)? true : false; } bool operator() (value_null, value_null) const @@ -187,7 +187,7 @@ namespace mapnik { bool operator() (UnicodeString const& lhs, UnicodeString const& rhs) const { - return lhs > rhs; + return (lhs > rhs) ? true : false ; } bool operator() (value_null, value_null) const @@ -223,7 +223,7 @@ namespace mapnik { bool operator() (UnicodeString const& lhs, UnicodeString const& rhs) const { - return lhs >= rhs; + return ( lhs >= rhs ) ? true : false ; } bool operator() (value_null, value_null) const @@ -260,7 +260,7 @@ namespace mapnik { bool operator()(UnicodeString const& lhs, UnicodeString const& rhs ) const { - return lhs < rhs; + return (lhs < rhs) ? true : false ; } bool operator() (value_null, value_null) const @@ -297,7 +297,7 @@ namespace mapnik { bool operator()(UnicodeString const& lhs, UnicodeString const& rhs ) const { - return lhs <= rhs; + return (lhs <= rhs) ? true : false ; } bool operator() (value_null, value_null) const diff --git a/src/envelope.cpp b/src/envelope.cpp index 75ffd6d2f..7b43a1609 100644 --- a/src/envelope.cpp +++ b/src/envelope.cpp @@ -308,12 +308,12 @@ namespace mapnik Envelope& Envelope::operator*=(T t) { coord c = center(); - T sx = 0.5 * width() * t; - T sy = 0.5 * height() * t; - minx_ = static_cast(c.x - sx); - maxx_ = static_cast(c.x + sx); - miny_ = static_cast(c.y - sy); - maxy_ = static_cast(c.y + sy); + T sx = static_cast(0.5 * width() * t); + T sy = static_cast(0.5 * height() * t); + minx_ = c.x - sx; + maxx_ = c.x + sx; + miny_ = c.y - sy; + maxy_ = c.y + sy; return *this; } @@ -321,12 +321,12 @@ namespace mapnik Envelope& Envelope::operator/=(T t) { coord c = center(); - T sx = 0.5 * width() / t; - T sy = 0.5 * height() / t; - minx_ = static_cast(c.x - sx); - maxx_ = static_cast(c.x + sx); - miny_ = static_cast(c.y - sy); - maxy_ = static_cast(c.y + sy); + T sx = static_cast(0.5 * width() / t); + T sy = static_cast(0.5 * height() / t); + minx_ = c.x - sx; + maxx_ = c.x + sx; + miny_ = c.y - sy; + maxy_ = c.y + sy; return *this; } diff --git a/src/filter_factory.cpp b/src/filter_factory.cpp index 04cdd811e..8c178c212 100644 --- a/src/filter_factory.cpp +++ b/src/filter_factory.cpp @@ -27,9 +27,8 @@ namespace mapnik { filter_ptr create_filter (std::string const& wkt,std::string const& encoding) { - filter_factory factory; transcoder tr(encoding); - return factory.compile(wkt,tr); + return filter_factory::compile(wkt,tr); } filter_ptr create_filter (std::string const& wkt) diff --git a/src/proj_transform.cpp b/src/proj_transform.cpp index ec9cfaf98..f08f9f9c6 100644 --- a/src/proj_transform.cpp +++ b/src/proj_transform.cpp @@ -38,8 +38,8 @@ namespace mapnik { #ifdef MAPNIK_THREADSAFE mutex::scoped_lock lock(projection::mutex_); #endif - is_source_latlong_ = pj_is_latlong(source_.proj_); - is_dest_latlong_ = pj_is_latlong(dest_.proj_); + is_source_latlong_ = pj_is_latlong(source_.proj_) ? true : false; + is_dest_latlong_ = pj_is_latlong(dest_.proj_) ? true : false ; is_source_equal_dest = (source_ == dest_); } diff --git a/src/projection.cpp b/src/projection.cpp index 9143b59f0..a9ecc1ab2 100644 --- a/src/projection.cpp +++ b/src/projection.cpp @@ -73,7 +73,7 @@ namespace mapnik { #ifdef MAPNIK_THREADSAFE mutex::scoped_lock lock(mutex_); #endif - return pj_is_latlong(proj_); + return pj_is_latlong(proj_) ? true : false; } std::string const& projection::params() const