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/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);