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

@@ -336,9 +336,8 @@ struct GoalQuestionWindow : public Window {
this->question = stredup(question);
/* Figure out which buttons we have to enable. */
uint bit;
int n = 0;
FOR_EACH_SET_BIT(bit, button_mask) {
for (uint bit : SetBitIterator(button_mask)) {
if (bit >= GOAL_QUESTION_BUTTON_COUNT) break;
this->button[n++] = bit;
if (n == 3) break;