You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenTTD-patches/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.
3 years ago
..
CMakeLists.txt Add: introduce CMake for project management 4 years ago
afterload.cpp Change: Apply some consistency to singleplayer related comments 3 years ago
ai_sl.cpp Cleanup: Removed SVN headers 5 years ago
airport_sl.cpp Cleanup: Removed SVN headers 5 years ago
animated_tile_sl.cpp Cleanup: Removed SVN headers 5 years ago
autoreplace_sl.cpp Codechange: Replace FOR_ALL_ENGINE_RENEWS with range-based for loops 5 years ago
cargomonitor_sl.cpp Cleanup: Removed SVN headers 5 years ago
cargopacket_sl.cpp Codechange: Replace vehicle related FOR_ALL with range-based for loops 5 years ago
cheat_sl.cpp Cleanup: Removed SVN headers 5 years ago
company_sl.cpp Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
depot_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 4 years ago
economy_sl.cpp Cleanup: Remove save-only autolength flag from economy chunk handlers 4 years ago
engine_sl.cpp Codechange: Make use of the improved C++17 emplace_back function. 4 years ago
game_sl.cpp Codechange: Store GS lang texts in std::strings. 4 years ago
gamelog_sl.cpp Codechange: Replace assert_compile macro with static_assert 4 years ago
goal_sl.cpp Codechange: Replace FOR_ALL_GOALS with range-based for loops 5 years ago
group_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 4 years ago
industry_sl.cpp Feature: Allow GameScripts to add additional text to Industry view window 3 years ago
labelmaps_sl.cpp Fix #7925: Reset temporary saveload data at the start of loading a savegame instead of at the end. 5 years ago
linkgraph_sl.cpp Codechange: Don't use cpp_offsetof in the save/load code. 3 years ago
map_sl.cpp Cleanup: Removed SVN headers 5 years ago
misc_sl.cpp Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
newgrf_sl.cpp Cleanup: Removed SVN headers 5 years ago
newgrf_sl.h Cleanup: Removed SVN headers 5 years ago
object_sl.cpp Codechange: Replace FOR_ALL_OBJECTS with range-based for loops 5 years ago
oldloader.cpp Codechange: Don't use cpp_offsetof in the TTO/TTD savegame loader. 3 years ago
oldloader.h Codechange: Don't use cpp_offsetof in the TTO/TTD savegame loader. 3 years ago
oldloader_sl.cpp Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
order_sl.cpp Fix 63ccb36e: Incorrect string type for OrderBackup::name save/load 4 years ago
saveload.cpp Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
saveload.h Codechange: Don't use cpp_offsetof in the save/load code. 3 years ago
saveload_filter.h Cleanup: Removed SVN headers 5 years ago
saveload_internal.h Codechange: Use std::string for most of the user-settable custom names. 4 years ago
signs_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 4 years ago
station_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 4 years ago
storage_sl.cpp Codechange: Replace FOR_ALL_STORAGES with range-based for loops 5 years ago
story_sl.cpp Codechange: Replace story related FOR_ALL with range-based for loops 5 years ago
strings_sl.cpp Codechange: Use std::string for most of the user-settable custom names. 4 years ago
subsidy_sl.cpp Codechange: Replace FOR_ALL_SUBSIDIES with range-based for loops 5 years ago
town_sl.cpp Codechange #8258: Remove unused town cargo caches from the savegame 4 years ago
vehicle_sl.cpp Fix #8589, 653e7fa548: Motion counter is NewGRF-visible but not saved, leading to desyncs. (#8591) 3 years ago
waypoint_sl.cpp Codechange: Make use of the improved C++17 emplace_back function. 4 years ago