From 32cc9317f2ef7542dd2641c630ea3f5effdb5aba Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 17 Sep 2020 13:38:46 +0200 Subject: [PATCH] Use dedicated CRT function to round the value with MSVC --- include/wx/math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/math.h b/include/wx/math.h index 2c3b2cb081..f7ee41351d 100644 --- a/include/wx/math.h +++ b/include/wx/math.h @@ -117,7 +117,7 @@ wxASSERT_MSG(x > (double)INT_MIN - 0.5 && x < (double)INT_MAX + 0.5, wxT("argument out of supported range")); -#if defined(HAVE_ROUND) +#if defined(HAVE_ROUND) || defined(__VISUALC__) return int(round(x)); #else return (int)(x < 0 ? x - 0.5 : x + 0.5);