(svn r8097) Replace strlen() {==,!=,>} 0 by the more concise {,!}StrEmpty(). Additionally the test takes O(1) instead of O(n) now
This commit is contained in:
@@ -1291,8 +1291,9 @@ void NetworkPopulateCompanyInfo(void)
|
||||
|
||||
ci = DEREF_CLIENT_INFO(cs);
|
||||
if (ci != NULL && IsValidPlayer(ci->client_playas)) {
|
||||
if (strlen(_network_player_info[ci->client_playas].players) != 0)
|
||||
if (!StrEmpty(_network_player_info[ci->client_playas].players)) {
|
||||
ttd_strlcat(_network_player_info[ci->client_playas].players, ", ", lengthof(_network_player_info[0].players));
|
||||
}
|
||||
|
||||
ttd_strlcat(_network_player_info[ci->client_playas].players, client_name, lengthof(_network_player_info[0].players));
|
||||
}
|
||||
|
Reference in New Issue
Block a user