knock out some msvc compiler warnings
This commit is contained in:
parent
3fd7909ba0
commit
772c7f52fc
9 changed files with 14 additions and 14 deletions
|
@ -114,7 +114,7 @@
|
|||
|
||||
namespace mapnik { namespace filter { namespace detail {
|
||||
|
||||
static const float blur_matrix[] = {0.1111,0.1111,0.1111,0.1111,0.1111,0.1111,0.1111,0.1111,0.1111};
|
||||
static const float blur_matrix[] = {0.1111f,0.1111f,0.1111f,0.1111f,0.1111f,0.1111f,0.1111f,0.1111f,0.1111f};
|
||||
static const float emboss_matrix[] = {-2,-1,0,-1,1,1,0,1,2};
|
||||
static const float sharpen_matrix[] = {0,-1,0,-1,5,-1,0,-1,0 };
|
||||
static const float edge_detect_matrix[] = {0,1,0,1,-4,1,0,1,0 };
|
||||
|
|
|
@ -293,7 +293,7 @@ private:
|
|||
last_y = next_y;
|
||||
}
|
||||
}
|
||||
unsigned points = round(length / s);
|
||||
unsigned points = static_cast<unsigned>(round(length / s));
|
||||
if (points == 0) return 0.0; //Path to short
|
||||
return length / points;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ public:
|
|||
|
||||
// select best of all reducible:
|
||||
unsigned red_idx = leaf_level_-1;
|
||||
unsigned bestv = (*reducible_[red_idx].begin())->reduce_cost;
|
||||
unsigned bestv = static_cast<unsigned>((*reducible_[red_idx].begin())->reduce_cost);
|
||||
for(unsigned i=red_idx; i>=InsertPolicy::MIN_LEVELS; i--)
|
||||
{
|
||||
if (!reducible_[i].empty())
|
||||
|
|
|
@ -200,8 +200,8 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
// if layer-level filter_factor is set, apply it
|
||||
if (filter_factor_)
|
||||
{
|
||||
im_width *= filter_factor_;
|
||||
im_height *= filter_factor_;
|
||||
im_width = int(im_width * filter_factor_ + 0.5);
|
||||
im_height = int(im_height * filter_factor_ + 0.5);
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Applying layer filter_factor=" << filter_factor_;
|
||||
}
|
||||
|
@ -209,8 +209,8 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
|
|||
else
|
||||
{
|
||||
double sym_downsample_factor = q.get_filter_factor();
|
||||
im_width *= sym_downsample_factor;
|
||||
im_height *= sym_downsample_factor;
|
||||
im_width = int(im_width * sym_downsample_factor + 0.5);
|
||||
im_height = int(im_height * sym_downsample_factor + 0.5);
|
||||
}
|
||||
|
||||
// case where we need to avoid upsampling so that the
|
||||
|
|
|
@ -132,7 +132,7 @@ void agg_renderer<T>::process(line_pattern_symbolizer const& sym,
|
|||
if (sym.clip())
|
||||
{
|
||||
double padding = (double)(query_extent_.width()/pixmap_.width());
|
||||
float half_stroke = (*mark)->width()/2.0;
|
||||
double half_stroke = (*mark)->width()/2.0;
|
||||
if (half_stroke > 1)
|
||||
padding *= half_stroke;
|
||||
clipping_extent.pad(padding);
|
||||
|
|
|
@ -89,7 +89,7 @@ void agg_renderer<T>::process(line_symbolizer const& sym,
|
|||
if (sym.clip())
|
||||
{
|
||||
double padding = (double)(query_extent_.width()/pixmap_.width());
|
||||
float half_stroke = stroke_.get_width()/2.0;
|
||||
double half_stroke = stroke_.get_width()/2.0;
|
||||
if (half_stroke > 1)
|
||||
padding *= half_stroke;
|
||||
if (fabs(sym.offset()) > 0)
|
||||
|
|
|
@ -1052,7 +1052,7 @@ void cairo_renderer_base::process(line_symbolizer const& sym,
|
|||
if (sym.clip())
|
||||
{
|
||||
double padding = (double)(query_extent_.width()/width_);
|
||||
float half_stroke = stroke_.get_width()/2.0;
|
||||
double half_stroke = stroke_.get_width()/2.0;
|
||||
if (half_stroke > 1)
|
||||
padding *= half_stroke;
|
||||
if (fabs(sym.offset()) > 0)
|
||||
|
|
|
@ -74,7 +74,7 @@ void grid_renderer<T>::process(line_symbolizer const& sym,
|
|||
if (sym.clip())
|
||||
{
|
||||
double padding = (double)(query_extent_.width()/pixmap_.width());
|
||||
float half_stroke = stroke_.get_width()/2.0;
|
||||
double half_stroke = stroke_.get_width()/2.0;
|
||||
if (half_stroke > 1)
|
||||
padding *= half_stroke;
|
||||
if (fabs(sym.offset()) > 0)
|
||||
|
|
|
@ -1125,7 +1125,7 @@ void map_parser::parse_polygon_pattern_symbolizer(rule & rule,
|
|||
symbol.set_alignment(p_alignment);
|
||||
|
||||
// opacity
|
||||
optional<double> opacity = sym.get_opt_attr<double>("opacity");
|
||||
optional<float> opacity = sym.get_opt_attr<float>("opacity");
|
||||
if (opacity) symbol.set_opacity(*opacity);
|
||||
|
||||
// gamma
|
||||
|
@ -1212,7 +1212,7 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& sym)
|
|||
shield_symbol.set_shield_displacement(shield_dx,shield_dy);
|
||||
|
||||
// opacity
|
||||
optional<double> opacity = sym.get_opt_attr<double>("opacity");
|
||||
optional<float> opacity = sym.get_opt_attr<float>("opacity");
|
||||
if (opacity)
|
||||
{
|
||||
shield_symbol.set_opacity(*opacity);
|
||||
|
@ -1484,7 +1484,7 @@ void map_parser::parse_raster_symbolizer(rule & rule, xml_node const & sym)
|
|||
}
|
||||
|
||||
// opacity
|
||||
optional<double> opacity = sym.get_opt_attr<double>("opacity");
|
||||
optional<float> opacity = sym.get_opt_attr<float>("opacity");
|
||||
if (opacity) raster_sym.set_opacity(*opacity);
|
||||
|
||||
// filter factor
|
||||
|
|
Loading…
Reference in a new issue