From 3e0c30213b9647997cc5e77435088bbd9d4ce592 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 23 Feb 2021 22:37:50 +0100 Subject: Suppress Visual Studio warnings in nanosvg code - disable warning C4244 (conversion / data loss) - restore #pragma warning after nanosvg includes --- src/Fl_SVG_Image.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Fl_SVG_Image.cxx') diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index ffdc6d2a0..7436bdee8 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -32,6 +32,11 @@ static double strtoll(const char *str, char **endptr, int base) { } #endif +#ifdef _MSC_VER +#pragma warning (push) // Save #pragma warning status +#pragma warning (disable: 4244) // Switch off conversion warnings +#endif + #define NANOSVG_ALL_COLOR_KEYWORDS // Include full list of color keywords. #define NANOSVG_IMPLEMENTATION // Expands implementation #include "../nanosvg/nanosvg.h" @@ -39,6 +44,10 @@ static double strtoll(const char *str, char **endptr, int base) { #define NANOSVGRAST_IMPLEMENTATION // Expands implementation #include "../nanosvg/nanosvgrast.h" +#ifdef _MSC_VER +#pragma warning (pop) // Restore #pragma warning status +#endif + #if defined(HAVE_LIBZ) #include #endif -- cgit v1.2.3