Skip to content

Commit

Permalink
Merge pull request #5049 from Jackie9527/msvc-clang-inconsistent-miss…
Browse files Browse the repository at this point in the history
…ing-destructor-override

Fix warning related to inconsistent-missing-destructor-override.
  • Loading branch information
kimkulling committed Apr 26, 2023
2 parents ee6e05b + 71366ff commit 4dc3419
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion code/AssetLib/3DS/3DSLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ using namespace D3DS;
class Discreet3DSImporter : public BaseImporter {
public:
Discreet3DSImporter();
~Discreet3DSImporter();
~Discreet3DSImporter() override;

// -------------------------------------------------------------------
/** Returns whether the class can handle the format of the given file.
Expand Down
8 changes: 4 additions & 4 deletions code/AssetLib/3MF/3MFTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class EmbeddedTexture : public Resource {
// empty
}

~EmbeddedTexture() = default;
~EmbeddedTexture() override = default;

ResourceType getType() const override {
return ResourceType::RT_EmbeddedTexture2D;
Expand All @@ -110,7 +110,7 @@ class Texture2DGroup : public Resource {
// empty
}

~Texture2DGroup() = default;
~Texture2DGroup() override = default;

ResourceType getType() const override {
return ResourceType::RT_Texture2DGroup;
Expand All @@ -127,7 +127,7 @@ class BaseMaterials : public Resource {
// empty
}

~BaseMaterials() = default;
~BaseMaterials() override = default;

ResourceType getType() const override {
return ResourceType::RT_BaseMaterials;
Expand All @@ -152,7 +152,7 @@ class Object : public Resource {
// empty
}

~Object() = default;
~Object() override = default;

ResourceType getType() const override {
return ResourceType::RT_Object;
Expand Down
2 changes: 1 addition & 1 deletion code/AssetLib/Raw/RawLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace Assimp {
class RAWImporter : public BaseImporter {
public:
RAWImporter();
~RAWImporter();
~RAWImporter() override;

// -------------------------------------------------------------------
/** Returns whether the class can handle the format of the given file.
Expand Down
2 changes: 1 addition & 1 deletion code/AssetLib/Unreal/UnrealLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace Assimp {
class UnrealImporter : public BaseImporter {
public:
UnrealImporter();
~UnrealImporter();
~UnrealImporter() override;

// -------------------------------------------------------------------
/** @brief Returns whether we can handle the format of the given file
Expand Down
2 changes: 1 addition & 1 deletion code/AssetLib/glTF2/glTF2Asset.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ struct Buffer : public Object {

public:
Buffer();
~Buffer();
~Buffer() override;

void Read(Value &obj, Asset &r);

Expand Down
1 change: 0 additions & 1 deletion code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS)
-Wno-undef
-Wno-suggest-destructor-override
-Wno-suggest-override
-Wno-inconsistent-missing-destructor-override
-Wno-zero-as-null-pointer-constant
-Wno-global-constructors
-Wno-exit-time-destructors
Expand Down
2 changes: 1 addition & 1 deletion code/Common/ZipArchiveIOSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ZipFile : public IOStream {

public:
std::string m_Filename;
virtual ~ZipFile();
virtual ~ZipFile() override;

// IOStream interface
size_t Read(void *pvBuffer, size_t pSize, size_t pCount) override;
Expand Down
2 changes: 1 addition & 1 deletion include/assimp/DefaultIOStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ASSIMP_API DefaultIOStream : public IOStream {

public:
/** Destructor public to allow simple deletion to close the file. */
~DefaultIOStream ();
~DefaultIOStream () override;

// -------------------------------------------------------------------
/// Read from stream
Expand Down
10 changes: 5 additions & 5 deletions include/assimp/MemoryIOWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ namespace Assimp {
// ----------------------------------------------------------------------------------
class MemoryIOStream : public IOStream {
public:
MemoryIOStream (const uint8_t* buff, size_t len, bool own = false) :
buffer (buff),
MemoryIOStream (const uint8_t* buff, size_t len, bool own = false) :
buffer (buff),
length(len),
pos(static_cast<size_t>(0)),
own(own) {
Expand Down Expand Up @@ -145,7 +145,7 @@ class MemoryIOSystem : public IOSystem {
}

/// @brief Destructor.
~MemoryIOSystem() = default;
~MemoryIOSystem() override = default;

// -------------------------------------------------------------------
/// @brief Tests for the existence of a file at the given path.
Expand Down Expand Up @@ -190,7 +190,7 @@ class MemoryIOSystem : public IOSystem {
bool ComparePaths(const char* one, const char* second) const override {
return existing_io ? existing_io->ComparePaths(one, second) : false;
}

/// @brief Will push the directory.
bool PushDirectory( const std::string &path ) override {
return existing_io ? existing_io->PushDirectory(path) : false;
Expand All @@ -216,7 +216,7 @@ class MemoryIOSystem : public IOSystem {
bool CreateDirectory( const std::string &path ) override {
return existing_io ? existing_io->CreateDirectory(path) : false;
}

/// @brief Will change the directory.
bool ChangeDirectory( const std::string &path ) override {
return existing_io ? existing_io->ChangeDirectory(path) : false;
Expand Down
2 changes: 1 addition & 1 deletion include/assimp/ZipArchiveIOSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ZipArchiveIOSystem : public IOSystem {
//! Open a Zip using the proffered IOSystem
ZipArchiveIOSystem(IOSystem* pIOHandler, const char *pFilename, const char* pMode = "r");
ZipArchiveIOSystem(IOSystem* pIOHandler, const std::string& rFilename, const char* pMode = "r");
virtual ~ZipArchiveIOSystem();
virtual ~ZipArchiveIOSystem() override;
bool Exists(const char* pFilename) const override;
char getOsSeparator() const override;
IOStream* Open(const char* pFilename, const char* pMode = "rb") override;
Expand Down

0 comments on commit 4dc3419

Please sign in to comment.