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