+ fix msvc-9.0 compiler warnings

This commit is contained in:
Artem Pavlenko 2009-02-17 23:19:28 +00:00
parent 901223ef25
commit 97a40d7e7e
7 changed files with 26 additions and 27 deletions

View file

@ -29,7 +29,7 @@
namespace mapnik
{
class ellipsoid;
struct ellipsoid;
// great-circle distance

View file

@ -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();

View file

@ -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

View file

@ -308,12 +308,12 @@ namespace mapnik
Envelope<T>& Envelope<T>::operator*=(T t)
{
coord<T,2> c = center();
T sx = 0.5 * width() * t;
T sy = 0.5 * height() * t;
minx_ = static_cast<T>(c.x - sx);
maxx_ = static_cast<T>(c.x + sx);
miny_ = static_cast<T>(c.y - sy);
maxy_ = static_cast<T>(c.y + sy);
T sx = static_cast<T>(0.5 * width() * t);
T sy = static_cast<T>(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<T>& Envelope<T>::operator/=(T t)
{
coord<T,2> c = center();
T sx = 0.5 * width() / t;
T sy = 0.5 * height() / t;
minx_ = static_cast<T>(c.x - sx);
maxx_ = static_cast<T>(c.x + sx);
miny_ = static_cast<T>(c.y - sy);
maxy_ = static_cast<T>(c.y + sy);
T sx = static_cast<T>(0.5 * width() / t);
T sy = static_cast<T>(0.5 * height() / t);
minx_ = c.x - sx;
maxx_ = c.x + sx;
miny_ = c.y - sy;
maxy_ = c.y + sy;
return *this;
}

View file

@ -27,9 +27,8 @@ namespace mapnik
{
filter_ptr create_filter (std::string const& wkt,std::string const& encoding)
{
filter_factory<Feature> factory;
transcoder tr(encoding);
return factory.compile(wkt,tr);
return filter_factory<Feature>::compile(wkt,tr);
}
filter_ptr create_filter (std::string const& wkt)

View file

@ -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_);
}

View file

@ -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