Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.
Moderators: Committer, Committer
- Posts: 840
- Joined: Tue Sep 30, 2014 10:01 am
- Location: Wall IV
I trying to figure out what the right way to fix a certain memory leak is issue-2297
So I need a feedback if the following actually is possible (else i will prune the use case as dead code):
- I encounter a savefile, read the first five bytes
- as they are not "<?xml" i try to deserialize the save game as binary
- as binary deserialization fails I try to deserialize xml-based and succeed
If that is not a real use case the code would definitely become more nice.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Furthermore, I propse... we should default to four combat rounds instead of three ...for the good of playerkind.
Geoff the Medio
- Programming, Design, Admin
- Posts: 12381
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
If a save file doesn't start with "<?xml" then it isn't a valid XML save file and it (probably?) wouldn't parse, and so it is not necessary to attempt to load it as one.