fix warning in the Polyhedron demo edit plugin

This commit is contained in:
Sébastien Loriot 2014-07-04 10:05:54 +02:00
parent cdee5dccfc
commit 31042b8d81
3 changed files with 6 additions and 6 deletions

View File

@ -249,7 +249,7 @@ void Polyhedron_demo_edit_polyhedron_plugin::on_Select_isolated_components_butto
boost::optional<std::size_t> minimum =
edit_item->select_isolated_components(ui_widget.Threshold_size_spin_box->value());
if(minimum) {
ui_widget.Threshold_size_spin_box->setValue(*minimum);
ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
}
}
@ -260,7 +260,7 @@ void Polyhedron_demo_edit_polyhedron_plugin::on_Get_minimum_button_clicked() {
boost::optional<std::size_t> minimum = edit_item->get_minimum_isolated_component();
if(minimum) {
ui_widget.Threshold_size_spin_box->setValue(*minimum);
ui_widget.Threshold_size_spin_box->setValue((int) *minimum);
}
}

View File

@ -158,7 +158,7 @@ void Scene_edit_polyhedron_item::draw_edges() const {
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_DOUBLE, 0, positions.data());
glDrawElements(GL_LINES, edges.size(), GL_UNSIGNED_INT, edges.data());
glDrawElements(GL_LINES, (GLsizei) edges.size(), GL_UNSIGNED_INT, edges.data());
glDisableClientState(GL_VERTEX_ARRAY);
if(rendering_mode == Wireframe) {
@ -171,7 +171,7 @@ void Scene_edit_polyhedron_item::draw() const {
glVertexPointer(3, GL_DOUBLE, 0, positions.data());
glNormalPointer(GL_DOUBLE, 0, normals.data());
glDrawElements(GL_TRIANGLES, tris.size(), GL_UNSIGNED_INT, tris.data());
glDrawElements(GL_TRIANGLES, (GLsizei) tris.size(), GL_UNSIGNED_INT, tris.data());
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);

View File

@ -263,8 +263,8 @@ private:
Scene_polyhedron_item* poly_item;
// For drawing
std::vector<double> positions;
std::vector<unsigned int> tris;
std::vector<unsigned int> edges;
std::vector<std::size_t> tris;
std::vector<std::size_t> edges;
std::vector<double> normals;
Deform_mesh deform_mesh;