You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although I'm still convinced that this is no problem as the pool system is organized now (pointers to pool items of the same pool are essentially pointers into the same array, making their comparison well defined IIRC) it may silently fail and cause dedyncs when this will be changed.
The attached patch provides the comparator template PoolItemIndexLess and uses it for the StationSet.
You might also have a look at the following places, which also use sets of pointers or pointer as map keys:
src/newgrf_storage.cpp:10:static std::set<BaseStorageArray*> _changed_storage_arrays;
src/newgrf_storage.cpp:20: for (std::set<BaseStorageArray*>::iterator it = _changed_storage_arrays.begin(); it != _changed_storage_arrays.end(); it++) {
src/driver.h:49: typedef std::map<const char *, DriverFactoryBase *, StringCompare> Drivers;
src/newgrf.cpp:260:typedef std::map<StringID *, uint32> StringIDToGRFIDMapping;
rc/town_cmd.cpp:2469:std::map<const Town *, int> _town_test_ratings;
src/town_cmd.cpp:2489: std::map<const Town *, int>::iterator it = _town_test_ratings.find(t);
PhilSophus opened the ticket and wrote:
Attachments
Reported version: trunk
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/2348
The text was updated successfully, but these errors were encountered: