Use st algorithm
This commit is contained in:
@@ -121,15 +121,13 @@ public:
|
|||||||
VHandles::const_iterator it, it2, end(_indices.end());
|
VHandles::const_iterator it, it2, end(_indices.end());
|
||||||
|
|
||||||
|
|
||||||
// test for valid vertex indices
|
// Test if all vertex handles are valid. If not, we throw an error.
|
||||||
for (it=_indices.begin(); it!=end; ++it)
|
if ( std::any_of(_indices.begin(),_indices.end(),[this](const VertexHandle& vh){ return !mesh_.is_valid_handle(vh); } ) )
|
||||||
if (! mesh_.is_valid_handle(*it))
|
|
||||||
{
|
{
|
||||||
omerr() << "ImporterT: Face contains invalid vertex index\n";
|
omerr() << "ImporterT: Face contains invalid vertex index\n";
|
||||||
return fh;
|
return fh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// don't allow double vertices
|
// don't allow double vertices
|
||||||
for (it=_indices.begin(); it!=end; ++it)
|
for (it=_indices.begin(); it!=end; ++it)
|
||||||
for (it2=it+1; it2!=end; ++it2)
|
for (it2=it+1; it2!=end; ++it2)
|
||||||
|
|||||||
Reference in New Issue
Block a user