Browse Source

Disable warning only for gcc 8.0 or greater

Kim Kulling 5 years ago
parent
commit
42afc40d16
1 changed files with 10 additions and 0 deletions
  1. 10 0
      code/AssetLib/glTF/glTFAsset.h

+ 10 - 0
code/AssetLib/glTF/glTFAsset.h

@@ -60,13 +60,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <algorithm>
 #include <algorithm>
 #include <stdexcept>
 #include <stdexcept>
 
 
+#ifndef RAPIDJSON_HAS_STDSTRING
 #define RAPIDJSON_HAS_STDSTRING 1
 #define RAPIDJSON_HAS_STDSTRING 1
+#endif
+
+#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wclass-memaccess"
 #pragma GCC diagnostic ignored "-Wclass-memaccess"
+#endif
+
 #include <rapidjson/rapidjson.h>
 #include <rapidjson/rapidjson.h>
 #include <rapidjson/document.h>
 #include <rapidjson/document.h>
 #include <rapidjson/error/en.h>
 #include <rapidjson/error/en.h>
+
+#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
 #pragma GCC diagnostic pop
 #pragma GCC diagnostic pop
+#endif
+
 #ifdef ASSIMP_API
 #ifdef ASSIMP_API
 #   include <memory>
 #   include <memory>
 #   include <assimp/DefaultIOSystem.h>
 #   include <assimp/DefaultIOSystem.h>