(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:
tron
2007-01-13 15:00:16 +00:00
parent fc78ef95e1
commit abb644771a
5 changed files with 13 additions and 9 deletions

View File

@@ -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));
}