Merge pull request #4096 from lioncash/codeblock-init

CodeBlock: In-class initialize variables
This commit is contained in:
Markus Wick 2016-08-10 14:39:51 +02:00 committed by GitHub
commit b075d18d2e
1 changed files with 6 additions and 12 deletions

View File

@ -23,21 +23,15 @@ private:
virtual void PoisonMemory() = 0; virtual void PoisonMemory() = 0;
protected: protected:
u8* region; u8* region = nullptr;
size_t region_size; size_t region_size = 0;
size_t parent_region_size; size_t parent_region_size = 0;
bool m_has_child; bool m_has_child = false;
bool m_is_child; bool m_is_child = false;
CodeBlock* m_child; CodeBlock* m_child = nullptr;
public: public:
CodeBlock()
: region(nullptr), region_size(0), parent_region_size(0), m_has_child(false),
m_is_child(false), m_child(nullptr)
{
}
virtual ~CodeBlock() virtual ~CodeBlock()
{ {
if (region) if (region)