Codechange: Remove FOR_EACH_SET_BIT

This commit is contained in:
glx22
2021-06-13 04:18:21 +02:00
committed by Loïc Guilloux
parent 5844027eb8
commit 89ab8b79a5
9 changed files with 58 additions and 32 deletions

View File

@@ -961,8 +961,7 @@ static bool ReadSpriteLayout(ByteReader *buf, uint num_building_sprites, bool us
static CargoTypes TranslateRefitMask(uint32 refit_mask)
{
CargoTypes result = 0;
uint8 bit;
FOR_EACH_SET_BIT(bit, refit_mask) {
for (uint8 bit : SetBitIterator(refit_mask)) {
CargoID cargo = GetCargoTranslation(bit, _cur.grffile, true);
if (cargo != CT_INVALID) SetBit(result, cargo);
}