Commit a70c8deb authored by Mike Kremer's avatar Mike Kremer

Fixed some smaller issues with properties.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@106 66977474-1d4b-4f09-8fe9-267525286df2
parent f833f9a7
......@@ -122,8 +122,8 @@ void ResourceManager::resize_fprops(unsigned int _nf) {
void ResourceManager::resize_cprops(unsigned int _nc) {
for(std::vector<BaseProperty*>::iterator it = mesh_props_.begin();
it != mesh_props_.end(); ++it) {
for(std::vector<BaseProperty*>::iterator it = cell_props_.begin();
it != cell_props_.end(); ++it) {
(*it)->resize(_nc);
}
}
......@@ -174,9 +174,10 @@ void ResourceManager::released_property(VertexPropHandle _handle) {
delete (*(vertex_props_.begin() + _handle.idx()));
std::vector<BaseProperty*>::iterator it = vertex_props_.erase(vertex_props_.begin() + _handle.idx());
VertexPropHandle decrHandle(_handle.idx() - 1);
VertexPropHandle decrHandle(_handle.idx());
for(; it < vertex_props_.end(); ++it) {
(*it)->set_handle(decrHandle);
decrHandle.idx(decrHandle.idx()+1);
}
}
......@@ -184,9 +185,10 @@ void ResourceManager::released_property(EdgePropHandle _handle) {
delete (*(edge_props_.begin() + _handle.idx()));
std::vector<BaseProperty*>::iterator it = edge_props_.erase(edge_props_.begin() + _handle.idx());
EdgePropHandle decrHandle(_handle.idx() - 1);
EdgePropHandle decrHandle(_handle.idx());
for(; it < edge_props_.end(); ++it) {
(*it)->set_handle(decrHandle);
decrHandle.idx(decrHandle.idx()+1);
}
}
......@@ -194,9 +196,10 @@ void ResourceManager::released_property(HalfEdgePropHandle _handle) {
delete (*(halfedge_props_.begin() + _handle.idx()));
std::vector<BaseProperty*>::iterator it = halfedge_props_.erase(halfedge_props_.begin() + _handle.idx());
HalfEdgePropHandle decrHandle(_handle.idx() - 1);
HalfEdgePropHandle decrHandle(_handle.idx());
for(; it < halfedge_props_.end(); ++it) {
(*it)->set_handle(decrHandle);
decrHandle.idx(decrHandle.idx()+1);
}
}
......@@ -204,9 +207,10 @@ void ResourceManager::released_property(FacePropHandle _handle) {
delete (*(face_props_.begin() + _handle.idx()));
std::vector<BaseProperty*>::iterator it = face_props_.erase(face_props_.begin() + _handle.idx());
FacePropHandle decrHandle(_handle.idx() - 1);
FacePropHandle decrHandle(_handle.idx());
for(; it < face_props_.end(); ++it) {
(*it)->set_handle(decrHandle);
decrHandle.idx(decrHandle.idx()+1);
}
}
......@@ -214,9 +218,10 @@ void ResourceManager::released_property(HalfFacePropHandle _handle) {
delete (*(halfface_props_.begin() + _handle.idx()));
std::vector<BaseProperty*>::iterator it = halfface_props_.erase(halfface_props_.begin() + _handle.idx());
HalfFacePropHandle decrHandle(_handle.idx() - 1);
HalfFacePropHandle decrHandle(_handle.idx());
for(; it < halfface_props_.end(); ++it) {
(*it)->set_handle(decrHandle);
decrHandle.idx(decrHandle.idx()+1);
}
}
......@@ -224,9 +229,10 @@ void ResourceManager::released_property(CellPropHandle _handle) {
delete (*(cell_props_.begin() + _handle.idx()));
std::vector<BaseProperty*>::iterator it = cell_props_.erase(cell_props_.begin() + _handle.idx());
CellPropHandle decrHandle(_handle.idx() - 1);
CellPropHandle decrHandle(_handle.idx());
for(; it < cell_props_.end(); ++it) {
(*it)->set_handle(decrHandle);
decrHandle.idx(decrHandle.idx()+1);
}
}
......@@ -234,9 +240,10 @@ void ResourceManager::released_property(MeshPropHandle _handle) {
delete (*(mesh_props_.begin() + _handle.idx()));
std::vector<BaseProperty*>::iterator it = mesh_props_.erase(mesh_props_.begin() + _handle.idx());
MeshPropHandle decrHandle(_handle.idx() - 1);
MeshPropHandle decrHandle(_handle.idx());
for(; it < mesh_props_.end(); ++it) {
(*it)->set_handle(decrHandle);
decrHandle.idx(decrHandle.idx()+1);
}
}
......
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