mirror of https://github.com/CGAL/cgal
fix more warnings
This commit is contained in:
parent
731905c02c
commit
7f2ca4cfb7
|
|
@ -604,6 +604,7 @@ bool decimate_impl(const TriangleMesh& tm,
|
|||
typedef typename graph_traits::vertex_descriptor vertex_descriptor;
|
||||
typedef typename graph_traits::face_descriptor face_descriptor;
|
||||
typedef std::pair<std::size_t, std::size_t> Id_pair;
|
||||
typedef typename boost::property_traits<FaceCCIdMap>::value_type PID;
|
||||
|
||||
// compute the new mesh
|
||||
std::vector< std::vector< boost::container::small_vector<std::size_t,3> > > faces_per_cc(nb_corners_and_nb_cc.second);
|
||||
|
|
@ -698,7 +699,6 @@ bool decimate_impl(const TriangleMesh& tm,
|
|||
// TODO this is not optimal at all since we already have the set of contraints,
|
||||
// we could work on the graph on constraint and recover only the orientation
|
||||
// of the edge. To be done if someone find it too slow.
|
||||
typedef typename boost::property_traits<FaceCCIdMap>::value_type PID;
|
||||
std::vector<halfedge_descriptor> hborders;
|
||||
CGAL::Face_filtered_graph<TriangleMesh> ffg(tm, static_cast<PID>(cc_id), face_cc_ids);
|
||||
extract_boundary_cycles(ffg, std::back_inserter(hborders));
|
||||
|
|
@ -739,7 +739,7 @@ bool decimate_impl(const TriangleMesh& tm,
|
|||
#endif
|
||||
all_patches_successfully_remeshed = false;
|
||||
// make all vertices of the patch a corner
|
||||
CGAL::Face_filtered_graph<TriangleMesh> ffg(tm, cc_id, face_cc_ids);
|
||||
CGAL::Face_filtered_graph<TriangleMesh> ffg(tm, static_cast<PID>(cc_id), face_cc_ids);
|
||||
std::vector<vertex_descriptor> new_corners;
|
||||
for (vertex_descriptor v : vertices(ffg))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,14 +33,16 @@ namespace internal
|
|||
template <class GT, class Pair, class RegionMap>
|
||||
void fill_plane_or_vector_map(const std::vector<Pair>& normals, RegionMap region_map, typename GT::Vector_3)
|
||||
{
|
||||
for (std::size_t i = 0 ; i<normals.size(); ++i)
|
||||
typedef typename boost::property_traits<RegionMap>::key_type KT;
|
||||
for (KT i = 0 ; i<static_cast<KT>(normals.size()); ++i)
|
||||
put(region_map, i, normals[i].first.orthogonal_vector());
|
||||
}
|
||||
|
||||
template <class GT, class Pair, class RegionMap>
|
||||
void fill_plane_or_vector_map(const std::vector<Pair>& normals, RegionMap region_map, typename GT::Plane_3)
|
||||
{
|
||||
for (std::size_t i = 0 ; i<normals.size(); ++i)
|
||||
typedef typename boost::property_traits<RegionMap>::key_type KT;
|
||||
for (KT i = 0; i < static_cast<KT>(normals.size()); ++i)
|
||||
put(region_map, i, normals[i].first);
|
||||
}
|
||||
|
||||
|
|
@ -195,7 +197,7 @@ region_growing_of_planes_on_faces(const PolygonMesh& mesh,
|
|||
if (candidates.size() == 1)
|
||||
{
|
||||
Id new_id = *candidates.begin();
|
||||
put(region_map, f0, new_id);
|
||||
put(region_map, f0, static_cast<Id>(new_id));
|
||||
tmp[new_id].second.push_back(f0);
|
||||
tmp[i].second.clear();
|
||||
}
|
||||
|
|
@ -207,7 +209,7 @@ region_growing_of_planes_on_faces(const PolygonMesh& mesh,
|
|||
tmp.erase(last, tmp.end());
|
||||
|
||||
//update region map
|
||||
for (std::size_t i=0; i<tmp.size(); ++i)
|
||||
for (Id i=0; i<static_cast<Id>(tmp.size()); ++i)
|
||||
{
|
||||
for (face_descriptor f : tmp[i].second)
|
||||
put(region_map, f, i);
|
||||
|
|
|
|||
|
|
@ -451,9 +451,10 @@ namespace internal {
|
|||
Item_map item_map_ = Item_helper::get(item_map);
|
||||
|
||||
m_nb_regions = 0;
|
||||
typename boost::property_traits<Region_map>::value_type init_value(-1);
|
||||
for (auto it = input_range.begin(); it != input_range.end(); it++) {
|
||||
Item item = get(item_map_, it);
|
||||
put(m_region_map, item, std::size_t(-1));
|
||||
put(m_region_map, item, init_value);
|
||||
}
|
||||
// TODO if we want to allow subranges while NeighborQuery operates on the full range
|
||||
// (like for faces in a PolygonMesh) we should fill a non-visited map rather than a visited map
|
||||
|
|
@ -479,8 +480,9 @@ namespace internal {
|
|||
Boolean_property_map<VisitedMap> m_visited;
|
||||
|
||||
void fill_region_map(std::size_t idx, const Region& region) {
|
||||
typedef typename boost::property_traits<Region_map>::value_type Id;
|
||||
for (auto item : region) {
|
||||
put(m_region_map, item, idx);
|
||||
put(m_region_map, item, static_cast<Id>(idx));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue