diff --git a/code/AssetLib/AC/ACLoader.h b/code/AssetLib/AC/ACLoader.h index 5167394eb..77de16b8b 100644 --- a/code/AssetLib/AC/ACLoader.h +++ b/code/AssetLib/AC/ACLoader.h @@ -116,7 +116,7 @@ public: Mask = 0xf, }; - inline const uint8_t GetType() const { return (flags & Mask); } + inline uint8_t GetType() const { return (flags & Mask); } }; // Represents an AC3D object diff --git a/code/PostProcessing/ComputeUVMappingProcess.cpp b/code/PostProcessing/ComputeUVMappingProcess.cpp index b722e44f1..8ce3e41c4 100644 --- a/code/PostProcessing/ComputeUVMappingProcess.cpp +++ b/code/PostProcessing/ComputeUVMappingProcess.cpp @@ -122,7 +122,7 @@ void RemoveUVSeams (aiMesh* mesh, aiVector3D* out) const aiFace& face = mesh->mFaces[fidx]; if (face.mNumIndices < 3) continue; // triangles and polygons only, please - unsigned int small = face.mNumIndices, large = small; + unsigned int smallV = face.mNumIndices, large = smallV; bool zero = false, one = false, round_to_zero = false; // Check whether this face lies on a UV seam. We can just guess, @@ -133,7 +133,7 @@ void RemoveUVSeams (aiMesh* mesh, aiVector3D* out) { if (out[face.mIndices[n]].x < LOWER_LIMIT) { - small = n; + smallV = n; // If we have a U value very close to 0 we can't // round the others to 0, too. @@ -151,7 +151,7 @@ void RemoveUVSeams (aiMesh* mesh, aiVector3D* out) one = true; } } - if (small != face.mNumIndices && large != face.mNumIndices) + if (smallV != face.mNumIndices && large != face.mNumIndices) { for (unsigned int n = 0; n < face.mNumIndices;++n) { diff --git a/contrib/gtest/include/gtest/internal/gtest-internal.h b/contrib/gtest/include/gtest/internal/gtest-internal.h index ebd1cf615..e66c74841 100644 --- a/contrib/gtest/include/gtest/internal/gtest-internal.h +++ b/contrib/gtest/include/gtest/internal/gtest-internal.h @@ -1,4 +1,4 @@ -// Copyright 2005, Google Inc. +// Copyright 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/contrib/unzip/crypt.c b/contrib/unzip/crypt.c index c3cc5d991..299ce03d2 100644 --- a/contrib/unzip/crypt.c +++ b/contrib/unzip/crypt.c @@ -21,6 +21,10 @@ NOCRYPT and NOUNCRYPT. */ +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) + #define MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS 0 +#endif + #include #include #include diff --git a/include/assimp/Exceptional.h b/include/assimp/Exceptional.h index dab681b23..36d60d63a 100644 --- a/include/assimp/Exceptional.h +++ b/include/assimp/Exceptional.h @@ -75,6 +75,10 @@ public: template explicit DeadlyImportError(T&&... args) : DeadlyErrorBase(Assimp::Formatter::format(), std::forward(args)...) {} + +#if defined(_MSC_VER) && defined(__clang__) + DeadlyImportError(DeadlyImportError& other) = delete; +#endif }; class ASSIMP_API DeadlyExportError : public DeadlyErrorBase { @@ -83,6 +87,10 @@ public: template explicit DeadlyExportError(T&&... args) : DeadlyErrorBase(Assimp::Formatter::format(), std::forward(args)...) {} + +#if defined(_MSC_VER) && defined(__clang__) + DeadlyExportError(DeadlyExportError& other) = delete; +#endif }; #ifdef _MSC_VER diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h index 2f8421c1c..fdc88be56 100644 --- a/include/assimp/metadata.h +++ b/include/assimp/metadata.h @@ -351,7 +351,7 @@ struct aiMetadata { *static_cast(mValues[index].mData) = value; } else { if (nullptr != mValues[index].mData) { - delete mValues[index].mData; + delete static_cast(mValues[index].mData); mValues[index].mData = nullptr; } mValues[index].mData = new T(value);