Simplified isInGroup test.
This commit is contained in:
@@ -209,11 +209,8 @@ core::stringw Track::getSortName() const
|
||||
*/
|
||||
bool Track::isInGroup(const std::string &group_name)
|
||||
{
|
||||
for(unsigned int i=0; i<m_groups.size(); i++)
|
||||
{
|
||||
if(m_groups[i]==group_name) return true;
|
||||
}
|
||||
return false;
|
||||
return std::find(m_groups.begin(), m_groups.end(), group_name)
|
||||
!= m_groups.end();
|
||||
} // isInGroup
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -433,9 +433,7 @@ public:
|
||||
void itemCommand(const XMLNode *node);
|
||||
core::stringw getName() const;
|
||||
core::stringw getSortName() const;
|
||||
// ------------------------------------------------------------------------
|
||||
bool isInGroup(const std::string &group_name);
|
||||
// ------------------------------------------------------------------------
|
||||
const core::vector3df& getSunRotation();
|
||||
/** Sets the current ambient color for a kart with index k. */
|
||||
void setAmbientColor(const video::SColor &color,
|
||||
|
||||
Reference in New Issue
Block a user