silence a few msvc cast warnings

This commit is contained in:
Dane Springmeyer 2011-11-18 15:55:27 -08:00
parent 6c76896677
commit 7491d08b67
4 changed files with 6 additions and 6 deletions

View file

@ -84,7 +84,7 @@ public:
if (is_bitmap())
return (*bitmap_data_)->width();
else if (is_vector())
return (*vector_data_)->bounding_box().width();
return static_cast<unsigned>((*vector_data_)->bounding_box().width());
return 0;
}
inline unsigned height() const
@ -92,7 +92,7 @@ public:
if (is_bitmap())
return (*bitmap_data_)->height();
else if (is_vector())
return (*vector_data_)->bounding_box().height();
return static_cast<unsigned>((*vector_data_)->bounding_box().height());
return 0;
}

View file

@ -106,7 +106,7 @@ template <typename Locator, typename Detector> double markers_placement<Locator,
}
}
unsigned points = round(length / s);
if (points == 0) return 0; //Path to short
if (points == 0) return 0.0; //Path to short
return length / points;
}

View file

@ -86,7 +86,7 @@ public:
u = 0;
else if (u > 1)
u = 1;
return u*d;
return static_cast<int>(u*d);
}
private:
double x1_;

View file

@ -105,7 +105,7 @@ text_symbolizer::text_symbolizer(expression_ptr name, std::string const& face_na
max_char_angle_delta_(22.5 * M_PI/180.0),
fill_(fill),
halo_fill_(color(255,255,255)),
halo_radius_(0),
halo_radius_(0.0),
label_p_(POINT_PLACEMENT),
anchor_(0.0,0.5),
avoid_edges_(false),
@ -138,7 +138,7 @@ text_symbolizer::text_symbolizer(expression_ptr name, float size, color const& f
max_char_angle_delta_(22.5 * M_PI/180.0),
fill_(fill),
halo_fill_(color(255,255,255)),
halo_radius_(0),
halo_radius_(0.0),
label_p_(POINT_PLACEMENT),
anchor_(0.0,0.5),
avoid_edges_(false),