OpenTTD/src/saveload
Michael Lutz 7845434270 Codechange: Don't use cpp_offsetof in the save/load code.
Many of the member variables that are used in save/load are inside types
that are not standard layout types. Using pointer arithmetics to determine
addresses of members inside types that are not standard layout is generally
undefined behaviour. If we'd use C++17, it is conditionally supported, which means
each compiler may or may not support it. And even then using it for individual
array elements is syntactically not supported the the standard offsetof function.

Unfortunately, the trickery employed for saving linkgraph settings causes quite some
clutter in the settings ini files.
2021-02-13 20:08:53 +01:00
..
CMakeLists.txt Add: introduce CMake for project management 2020-06-05 19:36:05 +02:00
afterload.cpp Change: Apply some consistency to singleplayer related comments 2021-01-22 22:19:55 +01:00
ai_sl.cpp Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
airport_sl.cpp Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
animated_tile_sl.cpp Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
autoreplace_sl.cpp Codechange: Replace FOR_ALL_ENGINE_RENEWS with range-based for loops 2019-12-21 20:13:03 +01:00
cargomonitor_sl.cpp Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
cargopacket_sl.cpp Codechange: Replace vehicle related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
cheat_sl.cpp Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
company_sl.cpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
depot_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
economy_sl.cpp Cleanup: Remove save-only autolength flag from economy chunk handlers 2020-12-27 10:30:55 +00:00
engine_sl.cpp Codechange: Make use of the improved C++17 emplace_back function. 2020-12-15 00:29:30 +01:00
game_sl.cpp Codechange: Store GS lang texts in std::strings. 2020-05-21 20:02:34 +02:00
gamelog_sl.cpp Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
goal_sl.cpp Codechange: Replace FOR_ALL_GOALS with range-based for loops 2019-12-21 20:13:03 +01:00
group_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
industry_sl.cpp Feature: Allow GameScripts to add additional text to Industry view window 2021-01-22 09:50:53 +00:00
labelmaps_sl.cpp Fix #7925: Reset temporary saveload data at the start of loading a savegame instead of at the end. 2020-01-12 19:08:38 +01:00
linkgraph_sl.cpp Codechange: Don't use cpp_offsetof in the save/load code. 2021-02-13 20:08:53 +01:00
map_sl.cpp Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
misc_sl.cpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
newgrf_sl.cpp Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
newgrf_sl.h Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
object_sl.cpp Codechange: Replace FOR_ALL_OBJECTS with range-based for loops 2019-12-21 20:13:03 +01:00
oldloader.cpp Codechange: Don't use cpp_offsetof in the TTO/TTD savegame loader. 2021-02-13 20:08:53 +01:00
oldloader.h Codechange: Don't use cpp_offsetof in the TTO/TTD savegame loader. 2021-02-13 20:08:53 +01:00
oldloader_sl.cpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
order_sl.cpp Fix 63ccb36e: Incorrect string type for OrderBackup::name save/load 2020-06-22 08:02:42 +02:00
saveload.cpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
saveload.h Codechange: Don't use cpp_offsetof in the save/load code. 2021-02-13 20:08:53 +01:00
saveload_filter.h Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
saveload_internal.h Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
signs_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
station_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
storage_sl.cpp Codechange: Replace FOR_ALL_STORAGES with range-based for loops 2019-12-21 20:13:03 +01:00
story_sl.cpp Codechange: Replace story related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
strings_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
subsidy_sl.cpp Codechange: Replace FOR_ALL_SUBSIDIES with range-based for loops 2019-12-21 20:13:03 +01:00
town_sl.cpp Codechange #8258: Remove unused town cargo caches from the savegame 2020-07-27 17:32:00 +01:00
vehicle_sl.cpp Fix #8589, 653e7fa548: Motion counter is NewGRF-visible but not saved, leading to desyncs. (#8591) 2021-01-18 21:11:38 +01:00
waypoint_sl.cpp Codechange: Make use of the improved C++17 emplace_back function. 2020-12-15 00:29:30 +01:00