[master] 3e0c302 - Suppress Visual Studio warnings in nanosvg code

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 3e0c302 - Suppress Visual Studio warnings in nanosvg code "Albrecht Schlosser" May 07, 2021 top right image
 
commit 3e0c30213b9647997cc5e77435088bbd9d4ce592
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Tue Feb 23 22:37:50 2021 +0100
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Fri May 7 16:48:54 2021 +0200

    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(+)

diff --git src/Fl_SVG_Image.cxx src/Fl_SVG_Image.cxx
index ffdc6d2..7436bde 100644
--- src/Fl_SVG_Image.cxx
+++ 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
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.