Needed since 0180a72573 introduces the
requirement of a C compiler in the building process. Otherwise we get
this from GCC 6.1.1:
cc1: error: command line option ‘-Wold-style-cast’ is valid for C++/ObjC++ but not for C [-Werror]
For reproduce: play a scene, when the next settles down use Menu|Load to load the replay just created for the previous scene.
gtgftd suggested this patch. Seems to work. PR to document change for review.
* Moves load_game_exception to savegame.hpp and cleans some #includes
* Removes the load_game_exception statis members and replaces them with
a non-static load_game_metadata member.
* Adds loadgame::DIALOG_TYPE to remove the gui1 dependency.
* Fixes loading of replay saves.
* Adds soem mising override specifers in savegame.hpp
While they did contain settings that are required for Wesnoth to run
correctly in the Visual Studio debugger, these settings can also be
specified in the main project file (even if only by manually editing
the XML).
Including the *.user files is problematic since it also includes things
that a developer may wish to frequently change, such as command-line
arguments.
Thus, the settings have been moved into the main project file.
Because the join script attempts to join the game immediately after it has
been found, it tried to join the game before it had been added to the
games_ vector (from games_by_id_).
In addition to that, the check for if there is such a game had an
off-by-one error.
The two bugs, in combination, caused the game to index an empty vector.
Even if the STL implementation doesn't immediately crash the game, it's
going to crash later when it tries to interpret garbage data as the game
information.
Fixed by making the game update the games_ vector immediately after
fetching games from the server, and also fixing the off-by-one error.