diff --git a/src/guiengine/widgets/rating_bar_widget.cpp b/src/guiengine/widgets/rating_bar_widget.cpp index 856a4c24b..83b76a67d 100644 --- a/src/guiengine/widgets/rating_bar_widget.cpp +++ b/src/guiengine/widgets/rating_bar_widget.cpp @@ -19,15 +19,21 @@ #include "guiengine/modaldialog.hpp" #include "guiengine/widgets/rating_bar_widget.hpp" #include "utils/string_utils.hpp" -#include #include #include #include #include -#ifndef round -# define round(x) (floor(x+0.5f)) -#endif + +#ifdef WIN32 +// VS up to and including VS 2012 do not provide the normal round function +static inline double round(double val) +{ + return floor(val + 0.5); +} +#endif + +#include using namespace GUIEngine; using namespace irr::core;