Skip to content

Commit

Permalink
Update world_manager.cpp
Browse files Browse the repository at this point in the history
使用 STL 算法.
  • Loading branch information
ShenMian authored and hyv1001 committed Apr 15, 2022
1 parent f707783 commit cfa9df7
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,7 @@ namespace Pilot
if (m_current_active_level == nullptr)
return;

auto iter = m_levels.begin();
while (iter != m_levels.end())
{
if (*iter == m_current_active_level)
break;
++iter;
}
m_levels.erase(iter);
m_levels.erase(std::find(m_levels.begin(), m_levels.end(), m_current_active_level));

std::string current_level_url = m_current_active_level->getLevelResUrl();
m_current_active_level->clear();
Expand Down

0 comments on commit cfa9df7

Please sign in to comment.