mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-26 07:59:09 +00:00
Codechange: replace magic numbers and C-style arrays with C++-style array for share owners
This commit is contained in:
@@ -332,8 +332,8 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyInfo(const Company
|
||||
p->Send_bool (c->is_ai);
|
||||
p->Send_uint8 (CeilDiv(c->months_of_bankruptcy, 3)); // send as quarters_of_bankruptcy
|
||||
|
||||
for (size_t i = 0; i < lengthof(c->share_owners); i++) {
|
||||
p->Send_uint8(c->share_owners[i]);
|
||||
for (auto owner : c->share_owners) {
|
||||
p->Send_uint8(owner);
|
||||
}
|
||||
|
||||
this->SendPacket(p);
|
||||
@@ -359,8 +359,8 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyUpdate(const Compa
|
||||
p->Send_bool (NetworkCompanyIsPassworded(c->index));
|
||||
p->Send_uint8 (CeilDiv(c->months_of_bankruptcy, 3)); // send as quarters_of_bankruptcy
|
||||
|
||||
for (size_t i = 0; i < lengthof(c->share_owners); i++) {
|
||||
p->Send_uint8(c->share_owners[i]);
|
||||
for (auto owner : c->share_owners) {
|
||||
p->Send_uint8(owner);
|
||||
}
|
||||
|
||||
this->SendPacket(p);
|
||||
|
Reference in New Issue
Block a user