mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-20 02:42:42 +01:00
Codechange: Use EnumBitSet for GRFConfigFlags.
This is renamed from `GCF_Flag` didn't match convention.
This commit is contained in:
committed by
Peter Nelson
parent
877fa54f66
commit
6f52a977a8
@@ -418,11 +418,11 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNewGRFCheck()
|
||||
|
||||
auto p = std::make_unique<Packet>(this, PACKET_SERVER_CHECK_NEWGRFS, TCP_MTU);
|
||||
|
||||
uint grf_count = std::ranges::count_if(_grfconfig, [](const auto &c){ return !HasBit(c->flags, GCF_STATIC); });
|
||||
uint grf_count = std::ranges::count_if(_grfconfig, [](const auto &c){ return !c->flags.Test(GRFConfigFlag::Static); });
|
||||
p->Send_uint8 (grf_count);
|
||||
|
||||
for (const auto &c : _grfconfig) {
|
||||
if (!HasBit(c->flags, GCF_STATIC)) SerializeGRFIdentifier(*p, c->ident);
|
||||
if (!c->flags.Test(GRFConfigFlag::Static)) SerializeGRFIdentifier(*p, c->ident);
|
||||
}
|
||||
|
||||
this->SendPacket(std::move(p));
|
||||
|
||||
Reference in New Issue
Block a user