diff options
Diffstat (limited to 'include/lldb/Core/Opcode.h')
-rw-r--r-- | include/lldb/Core/Opcode.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/lldb/Core/Opcode.h b/include/lldb/Core/Opcode.h index 57b8077477ced..eac0746baba17 100644 --- a/include/lldb/Core/Opcode.h +++ b/include/lldb/Core/Opcode.h @@ -16,6 +16,7 @@ // C++ Includes // Other libraries and framework includes #include "llvm/Support/MathExtras.h" + // Project includes #include "lldb/Host/Endian.h" #include "lldb/lldb-public.h" @@ -23,7 +24,7 @@ namespace lldb { class SBInstruction; -} +} // namespace lldb namespace lldb_private { @@ -76,6 +77,7 @@ namespace lldb_private { m_byte_order = lldb::eByteOrderInvalid; m_type = Opcode::eTypeInvalid; } + Opcode::Type GetType () const { @@ -189,7 +191,7 @@ namespace lldb_private { void SetOpcodeBytes (const void *bytes, size_t length) { - if (bytes && length > 0) + if (bytes != nullptr && length > 0) { m_type = eTypeBytes; m_data.inst.length = length; @@ -210,9 +212,7 @@ namespace lldb_private { const void * GetOpcodeBytes () const { - if (m_type == Opcode::eTypeBytes) - return m_data.inst.bytes; - return NULL; + return ((m_type == Opcode::eTypeBytes) ? m_data.inst.bytes : nullptr); } uint32_t @@ -252,7 +252,7 @@ namespace lldb_private { case Opcode::eType64: return &m_data.inst64; case Opcode::eTypeBytes: return m_data.inst.bytes; } - return NULL; + return nullptr; } lldb::ByteOrder @@ -261,8 +261,8 @@ namespace lldb_private { bool GetEndianSwap() const { - return (m_byte_order == lldb::eByteOrderBig && lldb::endian::InlHostByteOrder() == lldb::eByteOrderLittle) || - (m_byte_order == lldb::eByteOrderLittle && lldb::endian::InlHostByteOrder() == lldb::eByteOrderBig); + return (m_byte_order == lldb::eByteOrderBig && endian::InlHostByteOrder() == lldb::eByteOrderLittle) || + (m_byte_order == lldb::eByteOrderLittle && endian::InlHostByteOrder() == lldb::eByteOrderBig); } lldb::ByteOrder m_byte_order; @@ -284,4 +284,4 @@ namespace lldb_private { } // namespace lldb_private -#endif // lldb_Opcode_h +#endif // lldb_Opcode_h |