mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-22 07:41:16 +00:00
Don't delete a member variable. C++ automatically destructs member variables
This commit is contained in:
parent
0b015bee3a
commit
317510f1d3
@ -1,14 +1,6 @@
|
|||||||
#include "mxstringvariable.h"
|
#include "mxstringvariable.h"
|
||||||
#include "mxstring.h"
|
#include "mxstring.h"
|
||||||
|
|
||||||
//FIXME: Figure out what exactly this class is used for. It is used in LegoGameState::LegoGameState when loading the background color, and for loading the "fsmovie" variable
|
|
||||||
// OFFSET: LEGO1 0x1003bec0
|
|
||||||
MxStringVariable::~MxStringVariable()
|
|
||||||
{
|
|
||||||
|
|
||||||
delete &m_string;
|
|
||||||
delete &m_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1003bea0
|
// OFFSET: LEGO1 0x1003bea0
|
||||||
MxString *MxStringVariable::GetString()
|
MxString *MxStringVariable::GetString()
|
||||||
@ -21,3 +13,10 @@ void MxStringVariable::SetString(const char *colorString)
|
|||||||
{
|
{
|
||||||
m_string = colorString;
|
m_string = colorString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME: Figure out what exactly this class is used for. It is used in LegoGameState::LegoGameState when loading the background color, and for loading the "fsmovie" variable
|
||||||
|
// OFFSET: LEGO1 0x1003bec0
|
||||||
|
void MxStringVariable::Destroy()
|
||||||
|
{
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ class MxStringVariable
|
|||||||
MxStringVariable() {}
|
MxStringVariable() {}
|
||||||
virtual MxString *GetString();
|
virtual MxString *GetString();
|
||||||
virtual void SetString(const char *colorString);
|
virtual void SetString(const char *colorString);
|
||||||
virtual ~MxStringVariable();
|
virtual void Destroy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MxString m_name;
|
MxString m_name;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user