| 2399 | |
| 2400 | |
| 2401 | bool cWorld::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback) |
| 2402 | { |
| 2403 | // Calls the callback for each player in the list |
| 2404 | cCSLock Lock(m_CSPlayers); |
| 2405 | for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) |
| 2406 | { |
| 2407 | if (NoCaseCompare((*itr)->GetName(), a_PlayerName) == 0) |
| 2408 | { |
| 2409 | a_Callback.Item(*itr); |
| 2410 | return true; |
| 2411 | } |
| 2412 | } // for itr - m_Players[] |
| 2413 | return false; |
| 2414 | } |
| 2415 | |
| 2416 | |
| 2417 |
no test coverage detected