Commit 4d5bff03 authored by Mike Kremer's avatar Mike Kremer

Fixed some cppcheck errors that might have lead to complications.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@244 66977474-1d4b-4f09-8fe9-267525286df2
parent d3ee1ea5
......@@ -476,8 +476,13 @@ void TopologyKernel::set_edge(const EdgeHandle& _eh, const VertexHandle& _fromVe
const HalfEdgeHandle heh0 = halfedge_handle(_eh, 0);
const HalfEdgeHandle heh1 = halfedge_handle(_eh, 1);
std::remove(outgoing_hes_per_vertex_[fv.idx()].begin(), outgoing_hes_per_vertex_[fv.idx()].end(), heh0);
std::remove(outgoing_hes_per_vertex_[tv.idx()].begin(), outgoing_hes_per_vertex_[tv.idx()].end(), heh1);
std::vector<HalfEdgeHandle>::iterator h_end = outgoing_hes_per_vertex_[fv.idx()].end();
h_end = std::remove(outgoing_hes_per_vertex_[fv.idx()].begin(), outgoing_hes_per_vertex_[fv.idx()].end(), heh0);
outgoing_hes_per_vertex_[fv.idx()].resize(h_end - outgoing_hes_per_vertex_[fv.idx()].begin());
h_end = std::remove(outgoing_hes_per_vertex_[tv.idx()].begin(), outgoing_hes_per_vertex_[tv.idx()].end(), heh1);
outgoing_hes_per_vertex_[tv.idx()].resize(h_end - outgoing_hes_per_vertex_[tv.idx()].begin());
outgoing_hes_per_vertex_[_fromVertex.idx()].push_back(heh0);
outgoing_hes_per_vertex_[_toVertex.idx()].push_back(heh1);
......@@ -504,10 +509,15 @@ void TopologyKernel::set_face(const FaceHandle& _fh, const std::vector<HalfEdgeH
for(std::vector<HalfEdgeHandle>::const_iterator he_it = hes.begin(),
he_end = hes.end(); he_it != he_end; ++he_it) {
std::remove(incident_hfs_per_he_[he_it->idx()].begin(),
incident_hfs_per_he_[he_it->idx()].end(), hf0);
std::remove(incident_hfs_per_he_[opposite_halfedge_handle(*he_it).idx()].begin(),
incident_hfs_per_he_[opposite_halfedge_handle(*he_it).idx()].end(), hf1);
std::vector<HalfFaceHandle>::iterator h_end = incident_hfs_per_he_[he_it->idx()].end();
h_end = std::remove(incident_hfs_per_he_[he_it->idx()].begin(),
incident_hfs_per_he_[he_it->idx()].end(), hf0);
incident_hfs_per_he_[he_it->idx()].resize(h_end - incident_hfs_per_he_[he_it->idx()].begin());
h_end = std::remove(incident_hfs_per_he_[opposite_halfedge_handle(*he_it).idx()].begin(),
incident_hfs_per_he_[opposite_halfedge_handle(*he_it).idx()].end(), hf1);
incident_hfs_per_he_[opposite_halfedge_handle(*he_it).idx()].resize(h_end - incident_hfs_per_he_[opposite_halfedge_handle(*he_it).idx()].begin());
}
for(std::vector<HalfEdgeHandle>::const_iterator he_it = _hes.begin(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment