Replies: 1 comment 1 reply
-
Good question. Concerning serialization of save files, it doesn't matter. So you won't break any save games if the checks at compile time are removed. For the Data struct, however, there is also a runtime check whether Data->Checksum matches the size of the struct. This is only checked when loading the game data and not for save files. It detects when the binary and data files are belonging to different versions of the game, so it does have some value. On the other hand, if you want to replace a fixed size char array by a pointer-type class as std::string, this means that sizeof() will vary across different platforms, similar to what happened in #494. In that case, I'd say the runtime check does more harm than good, so I'd support removing it as well. |
Beta Was this translation helpful? Give feedback.
-
It's been a while since I was immersed in the code, and I never did much with the Cereal updates, so this is aimed at @hweimer: is there a need for the Boost asserts guaranteeing the data structure sizes anymore, or are they antiquated (and removable)? It would be nice to change a few things like converting Astro names to strings from char[14].
Beta Was this translation helpful? Give feedback.
All reactions