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

@@ -577,7 +577,7 @@ template <typename F> CargoTypes FilterCargoMask(F filter_func, CargoTypes cargo
template <typename T, typename F> T CargoMaskValueFilter(CargoTypes &cargo_mask, F filter_func)
{
CargoID first_cargo_id = FindFirstBit64(cargo_mask);
CargoID first_cargo_id = FindFirstBit(cargo_mask);
T value = filter_func(first_cargo_id);
CargoTypes other_cargo_mask = cargo_mask;
ClrBit(other_cargo_mask, first_cargo_id);