Utilize std::any_of.
We have <algorithm>. Let's use it.
This commit is contained in:
+2
-6
@@ -760,12 +760,8 @@ void Model::SetSecondsIntoAnimation( float fSeconds )
|
|||||||
|
|
||||||
bool Model::MaterialsNeedNormals() const
|
bool Model::MaterialsNeedNormals() const
|
||||||
{
|
{
|
||||||
for (msMaterial const &m : m_Materials)
|
return std::any_of(m_Materials.begin(), m_Materials.end(),
|
||||||
{
|
[&](msMaterial const m) { return m.NeedsNormals(); });
|
||||||
if( m.NeedsNormals() )
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// lua start
|
// lua start
|
||||||
|
|||||||
Reference in New Issue
Block a user