Project

General

Profile

Feature #2049 ยป 0036-worklist.c-Replace-NULL-with-nullptr.patch

Marko Lindqvist, 06/14/2026 01:44 AM

View differences:

common/worklist.c
/* just setting the entry to zero: */
pwl->entries[i].kind = VUT_NONE;
/* all the union pointers should be in the same place: */
pwl->entries[i].value.building = NULL;
pwl->entries[i].value.building = nullptr;
}
}
......
return FALSE.
****************************************************************************/
bool worklist_peek_ith(const struct worklist *pwl,
struct universal *prod, int idx)
struct universal *prod, int idx)
{
/* Out of possible bounds. */
if (idx < 0 || pwl->length <= idx) {
prod->kind = VUT_NONE;
prod->value.building = NULL;
prod->value.building = nullptr;
return FALSE;
}
......
for (i = idx; i < pwl->length - 1; i++) {
pwl->entries[i] = pwl->entries[i + 1];
}
/* just setting the entry to zero: */
/* Just setting the entry to zero: */
pwl->entries[pwl->length - 1].kind = VUT_NONE;
/* all the union pointers should be in the same place: */
pwl->entries[pwl->length - 1].value.building = NULL;
/* All the union pointers should be in the same place: */
pwl->entries[pwl->length - 1].value.building = nullptr;
pwl->length--;
}
    (1-1/1)