From 876b24b5310ebf60c61345959a549b0b69e20c66 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Wed, 18 Jun 2014 22:57:32 +0200 Subject: [PATCH] dont forward declare return values in msvc <= 2010 this is a known compiler bug of msvc <= 2010 --- src/unit.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/unit.hpp b/src/unit.hpp index 895494e1a8d6..bdf56dbae018 100644 --- a/src/unit.hpp +++ b/src/unit.hpp @@ -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 +#else struct SDL_Color; +#endif class team; class unit_animation_component; class unit_formula_manager;