Replace FindFirstBit/FindFirstBit64 with a single template function
This commit is contained in:
@@ -220,7 +220,7 @@ void InitRailTypes()
|
||||
RailTypes compatible = _railtypes[rt].all_compatible_railtypes;
|
||||
RailTypes to_check = compatible;
|
||||
while (to_check) {
|
||||
RailType i = (RailType)FindFirstBit64(to_check);
|
||||
RailType i = (RailType)FindFirstBit(to_check);
|
||||
to_check = KillFirstBit(to_check);
|
||||
RailTypes new_types = _railtypes[i].compatible_railtypes & (~compatible);
|
||||
to_check |= new_types;
|
||||
@@ -228,7 +228,7 @@ void InitRailTypes()
|
||||
}
|
||||
RailTypes to_update = compatible;
|
||||
while (to_update) {
|
||||
RailType i = (RailType)FindFirstBit64(to_update);
|
||||
RailType i = (RailType)FindFirstBit(to_update);
|
||||
to_update = KillFirstBit(to_update);
|
||||
_railtypes[i].all_compatible_railtypes = compatible;
|
||||
}
|
||||
|
Reference in New Issue
Block a user