Fix #13513, ec492cb267: std::numeric_limits<CompanyMask> not working causes no vehicles to exist
std::numeric_limits<T>::max() returns 0 instead of an error when the type is unknown. Solve it by implementing and using Set() and All() in BaseBitSet in same way as std::bitset.
This commit is contained in:
@@ -109,7 +109,7 @@ struct ENGNChunkHandler : ChunkHandler {
|
||||
* Just cancel any previews. */
|
||||
e->flags.Reset(EngineFlag{4}); // ENGINE_OFFER_WINDOW_OPEN
|
||||
e->preview_company = INVALID_COMPANY;
|
||||
e->preview_asked = std::numeric_limits<CompanyMask>::max();
|
||||
e->preview_asked.Set();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user