From 5b9d06c2fca2a74736b426f572e9f8b3c5bbde66 Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Wed, 27 Jan 2021 09:19:35 +0000 Subject: [PATCH] Disable draco clang/gcc warnings via pragma draco templated functions also throw warnings --- code/AssetLib/glTF2/glTF2Asset.inl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/glTF2/glTF2Asset.inl b/code/AssetLib/glTF2/glTF2Asset.inl index b38217f83..b94301c24 100644 --- a/code/AssetLib/glTF2/glTF2Asset.inl +++ b/code/AssetLib/glTF2/glTF2Asset.inl @@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #ifdef ASSIMP_ENABLE_DRACO +#include "draco/draco_features.h" #include "draco/compression/decode.h" #include "draco/core/decoder_buffer.h" -#include "draco/draco_features.h" #ifndef DRACO_MESH_COMPRESSION_SUPPORTED #error glTF: KHR_draco_mesh_compression: draco library must have DRACO_MESH_COMPRESSION_SUPPORTED #endif @@ -190,6 +190,14 @@ inline Value *FindObject(Value &val, const char *id) { #pragma warning(push) #pragma warning(disable: 4018) // Signed/unsigned mismatch #pragma warning(disable: 4804) // Unsafe use of type 'bool' +#elif defined(__clang__) +#pragma diagnostic push +#pragma clang diagnostic ignored "-Wbool-compare" +#pragma clang diagnostic ignored "-Wsign-compare" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wbool-compare" +#pragma GCC diagnostic ignored "-Wsign-compare" #endif template @@ -276,9 +284,13 @@ inline void SetDecodedAttributeBuffer_Draco(const draco::Mesh &dracoMesh, uint32 #if _MSC_VER #pragma warning(pop) +#elif defined(__clang__) +#pragma diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif -#endif +#endif // ASSIMP_ENABLE_DRACO // // LazyDict methods