Commit ae006c15 authored by Mike Kremer's avatar Mike Kremer

Removed annoying warning about non-persistent properties when clearing OpenVolumeMeshes.

Patch was written by Max Lyon.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@254 66977474-1d4b-4f09-8fe9-267525286df2
parent 67552980
......@@ -200,20 +200,22 @@ void ResourceManager::entity_deleted(StdVecT& _vec, const OpenVolumeMeshHandle&
template<class StdVecT>
void ResourceManager::clearVec(StdVecT& _vec) {
StdVecT newVec;
for(typename StdVecT::iterator it = _vec.begin();
it != _vec.end(); ++it) {
if(!(*it)->persistent()) {
std::cerr << "Could not clear properties since at " <<
"least one property is still in use!" << std::endl;
return;
#ifndef NDEBUG
std::cerr << "Keeping property \"" << (*it)->name()
<< "\" since it is still in use!" << std::endl;
#endif
(*it)->resize(0);
newVec.push_back(*it);
}
else
delete *it;
}
for(typename StdVecT::iterator it = _vec.begin();
it != _vec.end(); ++it) {
delete *it;
}
_vec.clear();
_vec = newVec;
}
} // Namespace OpenVolumeMesh
......@@ -82,7 +82,7 @@ bool FileManager::readFile(const std::string& _filename, MeshT& _mesh,
Point v = Point(0.0, 0.0, 0.0);
unsigned int v1 = 0; unsigned int v2 = 0;
_mesh.clear();
_mesh.clear(false);
// Temporarily disable bottom-up incidences
// since it's way faster to first add all the
// geometry and compute them in one pass afterwards
......
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