Browse Source

diable warning only for gcc 8.0 or greater

Kim Kulling 5 years ago
parent
commit
620bebb999
1 changed files with 10 additions and 1 deletions
  1. 10 1
      code/AssetLib/glTF2/glTF2Asset.h

+ 10 - 1
code/AssetLib/glTF2/glTF2Asset.h

@@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
 
 Copyright (c) 2006-2020, assimp team
 
-
 All rights reserved.
 
 Redistribution and use of this software in source and binary forms,
@@ -63,13 +62,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <string>
 #include <vector>
 
+#ifndef RAPIDJSON_HAS_STDSTRING
 #define RAPIDJSON_HAS_STDSTRING 1
+#endif
+
+#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wclass-memaccess"
+#endif
+
 #include <rapidjson/document.h>
 #include <rapidjson/error/en.h>
 #include <rapidjson/rapidjson.h>
+
+#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
 #pragma GCC diagnostic pop
+#endif
+
 #ifdef ASSIMP_API
 #include <assimp/ByteSwapper.h>
 #include <assimp/DefaultIOSystem.h>