Add virtual destructor to CMATERIAL

CMATERIAL is a base class, so it should have a virtual constructor
to prevent undefined behavior (and silence warnings).
This commit is contained in:
Ian McInerney 2019-12-28 16:44:28 +00:00
parent 6ba8dcc121
commit c21e96bcf9
1 changed files with 2 additions and 0 deletions

View File

@ -175,6 +175,8 @@ public:
float aTransparency, float aTransparency,
float aReflection ); float aReflection );
virtual ~CMATERIAL() {}
const SFVEC3F &GetAmbientColor() const { return m_ambientColor; } const SFVEC3F &GetAmbientColor() const { return m_ambientColor; }
const SFVEC3F &GetEmissiveColor() const { return m_emissiveColor; } const SFVEC3F &GetEmissiveColor() const { return m_emissiveColor; }
const SFVEC3F &GetSpecularColor() const { return m_specularColor; } const SFVEC3F &GetSpecularColor() const { return m_specularColor; }