Replace FindFirstBit/FindFirstBit64 with a single template function

This commit is contained in:
Jonathan G Rennison
2021-11-01 23:00:44 +00:00
parent d585ce75dd
commit 1e0bea5b8d
8 changed files with 41 additions and 37 deletions

View File

@@ -345,7 +345,7 @@ void LinkRefresher::RefreshLinks(const Order *cur, const Order *next, uint8 flag
}
if (cur->IsType(OT_GOTO_STATION) || cur->IsType(OT_IMPLICIT)) {
if (cur->CanLeaveWithCargo(HasBit(flags, HAS_CARGO), FindFirstBit64(this->cargo_mask))) {
if (cur->CanLeaveWithCargo(HasBit(flags, HAS_CARGO), FindFirstBit(this->cargo_mask))) {
SetBit(flags, HAS_CARGO);
this->RefreshStats(cur, next);
} else {