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:
parent
5c83e18fbd
commit
2861e8f868
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue