diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-02-23 22:37:50 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-05-07 16:48:54 +0200 |
| commit | 3e0c30213b9647997cc5e77435088bbd9d4ce592 (patch) | |
| tree | 5f260a3deb290b13b8d6ea85c5704195b7d3e3ae /src | |
| parent | 374232e2f483119ef73a59159c885b483cc9325a (diff) | |
Suppress Visual Studio warnings in nanosvg code
- disable warning C4244 (conversion / data loss)
- restore #pragma warning after nanosvg includes
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_SVG_Image.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
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 <zlib.h> #endif |
