+ fix msvc-9.0 compiler warnings
This commit is contained in:
parent
901223ef25
commit
97a40d7e7e
7 changed files with 26 additions and 27 deletions
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
namespace mapnik
|
namespace mapnik
|
||||||
{
|
{
|
||||||
class ellipsoid;
|
struct ellipsoid;
|
||||||
|
|
||||||
// great-circle distance
|
// great-circle distance
|
||||||
|
|
||||||
|
|
|
@ -314,8 +314,8 @@ namespace mapnik
|
||||||
featureset_ptr query_map_point(unsigned index, double x, double y) const;
|
featureset_ptr query_map_point(unsigned index, double x, double y) const;
|
||||||
~Map();
|
~Map();
|
||||||
|
|
||||||
void setAspectFixMode(aspect_fix_mode afm) { aspectFixMode_ = afm; }
|
inline void setAspectFixMode(aspect_fix_mode afm) { aspectFixMode_ = afm; }
|
||||||
bool getAspectFixMode() { return aspectFixMode_; }
|
inline int getAspectFixMode() { return aspectFixMode_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fixAspectRatio();
|
void fixAspectRatio();
|
||||||
|
|
|
@ -96,13 +96,13 @@ namespace mapnik {
|
||||||
|
|
||||||
bool operator() (double lhs, int rhs) const
|
bool operator() (double lhs, int rhs) const
|
||||||
{
|
{
|
||||||
return lhs == rhs;
|
return (lhs == rhs)? true : false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator() (UnicodeString const& lhs,
|
bool operator() (UnicodeString const& lhs,
|
||||||
UnicodeString const& rhs) const
|
UnicodeString const& rhs) const
|
||||||
{
|
{
|
||||||
return lhs == rhs;
|
return (lhs == rhs) ? true: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator() (value_null, value_null) const
|
bool operator() (value_null, value_null) const
|
||||||
|
@ -139,7 +139,7 @@ namespace mapnik {
|
||||||
bool operator() (UnicodeString const& lhs,
|
bool operator() (UnicodeString const& lhs,
|
||||||
UnicodeString const& rhs) const
|
UnicodeString const& rhs) const
|
||||||
{
|
{
|
||||||
return lhs != rhs;
|
return (lhs != rhs)? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator() (value_null, value_null) const
|
bool operator() (value_null, value_null) const
|
||||||
|
@ -187,7 +187,7 @@ namespace mapnik {
|
||||||
|
|
||||||
bool operator() (UnicodeString const& lhs, UnicodeString const& rhs) const
|
bool operator() (UnicodeString const& lhs, UnicodeString const& rhs) const
|
||||||
{
|
{
|
||||||
return lhs > rhs;
|
return (lhs > rhs) ? true : false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator() (value_null, value_null) const
|
bool operator() (value_null, value_null) const
|
||||||
|
@ -223,7 +223,7 @@ namespace mapnik {
|
||||||
|
|
||||||
bool operator() (UnicodeString const& lhs, UnicodeString const& rhs) const
|
bool operator() (UnicodeString const& lhs, UnicodeString const& rhs) const
|
||||||
{
|
{
|
||||||
return lhs >= rhs;
|
return ( lhs >= rhs ) ? true : false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator() (value_null, value_null) const
|
bool operator() (value_null, value_null) const
|
||||||
|
@ -260,7 +260,7 @@ namespace mapnik {
|
||||||
bool operator()(UnicodeString const& lhs,
|
bool operator()(UnicodeString const& lhs,
|
||||||
UnicodeString const& rhs ) const
|
UnicodeString const& rhs ) const
|
||||||
{
|
{
|
||||||
return lhs < rhs;
|
return (lhs < rhs) ? true : false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator() (value_null, value_null) const
|
bool operator() (value_null, value_null) const
|
||||||
|
@ -297,7 +297,7 @@ namespace mapnik {
|
||||||
bool operator()(UnicodeString const& lhs,
|
bool operator()(UnicodeString const& lhs,
|
||||||
UnicodeString const& rhs ) const
|
UnicodeString const& rhs ) const
|
||||||
{
|
{
|
||||||
return lhs <= rhs;
|
return (lhs <= rhs) ? true : false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator() (value_null, value_null) const
|
bool operator() (value_null, value_null) const
|
||||||
|
|
|
@ -308,12 +308,12 @@ namespace mapnik
|
||||||
Envelope<T>& Envelope<T>::operator*=(T t)
|
Envelope<T>& Envelope<T>::operator*=(T t)
|
||||||
{
|
{
|
||||||
coord<T,2> c = center();
|
coord<T,2> c = center();
|
||||||
T sx = 0.5 * width() * t;
|
T sx = static_cast<T>(0.5 * width() * t);
|
||||||
T sy = 0.5 * height() * t;
|
T sy = static_cast<T>(0.5 * height() * t);
|
||||||
minx_ = static_cast<T>(c.x - sx);
|
minx_ = c.x - sx;
|
||||||
maxx_ = static_cast<T>(c.x + sx);
|
maxx_ = c.x + sx;
|
||||||
miny_ = static_cast<T>(c.y - sy);
|
miny_ = c.y - sy;
|
||||||
maxy_ = static_cast<T>(c.y + sy);
|
maxy_ = c.y + sy;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,12 +321,12 @@ namespace mapnik
|
||||||
Envelope<T>& Envelope<T>::operator/=(T t)
|
Envelope<T>& Envelope<T>::operator/=(T t)
|
||||||
{
|
{
|
||||||
coord<T,2> c = center();
|
coord<T,2> c = center();
|
||||||
T sx = 0.5 * width() / t;
|
T sx = static_cast<T>(0.5 * width() / t);
|
||||||
T sy = 0.5 * height() / t;
|
T sy = static_cast<T>(0.5 * height() / t);
|
||||||
minx_ = static_cast<T>(c.x - sx);
|
minx_ = c.x - sx;
|
||||||
maxx_ = static_cast<T>(c.x + sx);
|
maxx_ = c.x + sx;
|
||||||
miny_ = static_cast<T>(c.y - sy);
|
miny_ = c.y - sy;
|
||||||
maxy_ = static_cast<T>(c.y + sy);
|
maxy_ = c.y + sy;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,8 @@ namespace mapnik
|
||||||
{
|
{
|
||||||
filter_ptr create_filter (std::string const& wkt,std::string const& encoding)
|
filter_ptr create_filter (std::string const& wkt,std::string const& encoding)
|
||||||
{
|
{
|
||||||
filter_factory<Feature> factory;
|
|
||||||
transcoder tr(encoding);
|
transcoder tr(encoding);
|
||||||
return factory.compile(wkt,tr);
|
return filter_factory<Feature>::compile(wkt,tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
filter_ptr create_filter (std::string const& wkt)
|
filter_ptr create_filter (std::string const& wkt)
|
||||||
|
|
|
@ -38,8 +38,8 @@ namespace mapnik {
|
||||||
#ifdef MAPNIK_THREADSAFE
|
#ifdef MAPNIK_THREADSAFE
|
||||||
mutex::scoped_lock lock(projection::mutex_);
|
mutex::scoped_lock lock(projection::mutex_);
|
||||||
#endif
|
#endif
|
||||||
is_source_latlong_ = pj_is_latlong(source_.proj_);
|
is_source_latlong_ = pj_is_latlong(source_.proj_) ? true : false;
|
||||||
is_dest_latlong_ = pj_is_latlong(dest_.proj_);
|
is_dest_latlong_ = pj_is_latlong(dest_.proj_) ? true : false ;
|
||||||
is_source_equal_dest = (source_ == dest_);
|
is_source_equal_dest = (source_ == dest_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace mapnik {
|
||||||
#ifdef MAPNIK_THREADSAFE
|
#ifdef MAPNIK_THREADSAFE
|
||||||
mutex::scoped_lock lock(mutex_);
|
mutex::scoped_lock lock(mutex_);
|
||||||
#endif
|
#endif
|
||||||
return pj_is_latlong(proj_);
|
return pj_is_latlong(proj_) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string const& projection::params() const
|
std::string const& projection::params() const
|
||||||
|
|
Loading…
Reference in a new issue