Skip to content

Commit

Permalink
dont forward declare return values in msvc <= 2010
Browse files Browse the repository at this point in the history
this is a known compiler bug of msvc <= 2010
  • Loading branch information
gfgtdf committed Jun 18, 2014
1 parent a0e47b9 commit 876b24b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/unit.hpp
Expand Up @@ -25,7 +25,15 @@

class display;
class gamemap;
#if defined(_MSC_VER) && _MSC_VER <= 1600
/*
This is needed because msvc up to 2010 fails to correcty forward declare this struct as a return value this case.
And will create corrupt binaries without giving a warning / error.
*/
#include <SDL_video.h>
#else
struct SDL_Color;
#endif
class team;
class unit_animation_component;
class unit_formula_manager;
Expand Down

0 comments on commit 876b24b

Please sign in to comment.