x64Emitter: Clean up constructor and destructors of XEmitter

In-class initializes members, defaults the default constructor and
virtual destructor, and puts members in the initializer list.
This commit is contained in:
Lioncash 2018-03-25 15:48:23 -04:00
parent 5c83e18fbd
commit 2861e8f868
1 changed files with 5 additions and 13 deletions

View File

@ -329,8 +329,8 @@ class XEmitter
{
friend struct OpArg; // for Write8 etc
private:
u8* code;
bool flags_locked;
u8* code = nullptr;
bool flags_locked = false;
void CheckFlags();
@ -377,17 +377,9 @@ protected:
void Write64(u64 value);
public:
XEmitter()
{
code = nullptr;
flags_locked = false;
}
explicit XEmitter(u8* code_ptr)
{
code = code_ptr;
flags_locked = false;
}
virtual ~XEmitter() {}
XEmitter() = default;
explicit XEmitter(u8* code_ptr) : code{code_ptr} {}
virtual ~XEmitter() = default;
void SetCodePtr(u8* ptr);
void ReserveCodeSpace(int bytes);
const u8* AlignCodeTo(size_t alignment);