diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp index ec4e8f6d0e6..0ed18d57248 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp @@ -27,7 +27,7 @@ class Polyhedron_demo_edit_polyhedron_plugin : public: Polyhedron_demo_edit_polyhedron_plugin() - : Polyhedron_demo_plugin_helper(), dock_widget(NULL), ui_widget(NULL) + : Polyhedron_demo_plugin_helper(), ui_widget(NULL), dock_widget(NULL) { } ~Polyhedron_demo_edit_polyhedron_plugin() { } diff --git a/Polyhedron/demo/Polyhedron/Scene_edit_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Scene_edit_polyhedron_item.cpp index 610d8334012..76ee2919e30 100644 --- a/Polyhedron/demo/Polyhedron/Scene_edit_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_edit_polyhedron_item.cpp @@ -24,8 +24,8 @@ #include "ui_Deform_mesh.h" Scene_edit_polyhedron_item::Scene_edit_polyhedron_item(Scene_polyhedron_item* poly_item, Ui::DeformMesh* ui_widget) - : poly_item(poly_item), deform_mesh(*(poly_item->polyhedron()), Vertex_index_map(), Edge_index_map()) - , ui_widget(ui_widget), frame(new qglviewer::ManipulatedFrame()), quadric(gluNewQuadric()) + : ui_widget(ui_widget), poly_item(poly_item), frame(new qglviewer::ManipulatedFrame()), + deform_mesh(*(poly_item->polyhedron()), Vertex_index_map(), Edge_index_map()), quadric(gluNewQuadric()) { // it is not good to rely on id() for reaching original positions // if usage of vertex index map is changed in Deform_mesh, we need to change this part to use map instead of vector diff --git a/Surface_modeling/include/CGAL/Deform_mesh.h b/Surface_modeling/include/CGAL/Deform_mesh.h index d8e4eed85f3..fcc66a2bf34 100644 --- a/Surface_modeling/include/CGAL/Deform_mesh.h +++ b/Surface_modeling/include/CGAL/Deform_mesh.h @@ -191,11 +191,12 @@ public: double tolerance = 1e-4, Weight_calculator weight_calculator = Weight_calculator()) : polyhedron(polyhedron), vertex_index_map(vertex_index_map), edge_index_map(edge_index_map), - iterations(iterations), tolerance(tolerance), weight_calculator(weight_calculator), - need_preprocess(true), last_preprocess_successful(false), + ros_id_map(std::vector(boost::num_vertices(polyhedron), -1)), is_roi_map(std::vector(boost::num_vertices(polyhedron), false)), is_hdl_map(std::vector(boost::num_vertices(polyhedron), false)), - ros_id_map(std::vector(boost::num_vertices(polyhedron), -1)) + iterations(iterations), tolerance(tolerance), + need_preprocess(true), last_preprocess_successful(false), + weight_calculator(weight_calculator) { // assign id to each vertex and edge vertex_iterator vb, ve;