Skip to content
Snippets Groups Projects
Commit 78d8771a authored by Mike Kremer's avatar Mike Kremer
Browse files

Changed handling of wrong vector size when swapping vertices. Now an error...

Changed handling of wrong vector size when swapping vertices. Now an error message is generated but the size will be corrected and the values will still be swapped.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@282 66977474-1d4b-4f09-8fe9-267525286df2
parent 4d951c8a
No related branches found
No related tags found
No related merge requests found
......@@ -182,8 +182,9 @@ public:
void swap_vertices(std::vector<VecT>& _copy) {
if(_copy.size() != vertices_.size()) {
std::cerr << "Vertex vectors differ in size!" << std::endl;
return;
std::cerr << "Vertex vectors differ in size! The size of the copy " <<
"is artificially set to the correct one. Some values may not be correctly initialized." << std::endl;
_copy.resize(vertices_.size());
}
std::swap(vertices_, _copy);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment