Skip to content

Commit

Permalink
Improved comments for cWorld::DoWithPlayer().
Browse files Browse the repository at this point in the history
  • Loading branch information
madmaxoft committed Nov 30, 2014
1 parent d8e6931 commit a73c800
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/World.cpp
Expand Up @@ -2678,7 +2678,7 @@ bool cWorld::ForEachPlayer(cPlayerListCallback & a_Callback)

bool cWorld::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback)
{
// Calls the callback for each player in the list
// Calls the callback for the specified player in the list
cCSLock Lock(m_CSPlayers);
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Expand Down
3 changes: 2 additions & 1 deletion src/World.h
Expand Up @@ -315,7 +315,8 @@ class cWorld :
/** Calls the callback for each player in the list; returns true if all players processed, false if the callback aborted by returning true */
virtual bool ForEachPlayer(cPlayerListCallback & a_Callback) override; // >> EXPORTED IN MANUALBINDINGS <<

/** Calls the callback for the player of the given name; returns true if the player was found and the callback called, false if player not found. Callback return ignored */
/** Calls the callback for the player of the given name; returns true if the player was found and the callback called, false if player not found.
Callback return value is ignored. If there are multiple players of the same name, only (random) one is processed by the callback. */
bool DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS <<

/** Finds a player from a partial or complete player name and calls the callback - case-insensitive */
Expand Down

0 comments on commit a73c800

Please sign in to comment.