1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

Codechange: Replace SmallVector::Length() with std::vector::size()

This commit is contained in:
Henry Wilson
2018-09-23 12:23:54 +01:00
committed by PeterN
parent 56ae855dc2
commit a690936ed7
71 changed files with 287 additions and 297 deletions

View File

@@ -552,16 +552,16 @@ DEF_CONSOLE_CMD(ConUnBan)
/* Try by IP. */
uint index;
for (index = 0; index < _network_ban_list.Length(); index++) {
for (index = 0; index < _network_ban_list.size(); index++) {
if (strcmp(_network_ban_list[index], argv[1]) == 0) break;
}
/* Try by index. */
if (index >= _network_ban_list.Length()) {
if (index >= _network_ban_list.size()) {
index = atoi(argv[1]) - 1U; // let it wrap
}
if (index < _network_ban_list.Length()) {
if (index < _network_ban_list.size()) {
char msg[64];
seprintf(msg, lastof(msg), "Unbanned %s", _network_ban_list[index]);
IConsolePrint(CC_DEFAULT, msg);