From 944b39c51d8fedc5b6ef41f3b30c4e396bebc9d6 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Sat, 27 Jun 2015 22:43:33 -0500 Subject: [PATCH] Apply some lint n' stuff --- src/xenia/base/byte_order.h | 30 ++++++++++++++++++++++------ src/xenia/kernel/objects/xmodule.h | 5 +++-- src/xenia/kernel/util/xex2_info.h | 5 ++--- src/xenia/kernel/xboxkrnl_modules.cc | 4 ++-- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/xenia/base/byte_order.h b/src/xenia/base/byte_order.h index 0f1078317..ef875145e 100644 --- a/src/xenia/base/byte_order.h +++ b/src/xenia/base/byte_order.h @@ -84,12 +84,30 @@ struct be { be(const be &other) { value = other.value; } operator T() const { return xe::byte_swap(value); } - be& operator+=(int a) { *this = *this + a; return *this; } - be& operator-=(int a) { *this = *this - a; return *this; } - be& operator++() { *this += 1; return *this; } // ++a - be operator++(int) { *this += 1; return (*this - 1); } // a++ - be& operator--() { *this -= 1; return *this; } // --a - be operator--(int) { *this -= 1; return (*this + 1); } // a-- + be &operator+=(int a) { + *this = *this + a; + return *this; + } + be &operator-=(int a) { + *this = *this - a; + return *this; + } + be &operator++() { + *this += 1; + return *this; + } // ++a + be operator++(int) { + *this += 1; + return (*this - 1); + } // a++ + be &operator--() { + *this -= 1; + return *this; + } // --a + be operator--(int) { + *this -= 1; + return (*this + 1); + } // a-- T value; }; diff --git a/src/xenia/kernel/objects/xmodule.h b/src/xenia/kernel/objects/xmodule.h index b6cc047a2..d6951b63b 100644 --- a/src/xenia/kernel/objects/xmodule.h +++ b/src/xenia/kernel/objects/xmodule.h @@ -80,7 +80,8 @@ class XModule : public XObject { virtual X_STATUS GetSection(const char* name, uint32_t* out_section_data, uint32_t* out_section_size); - static object_ref GetFromHModule(KernelState* kernel_state, void* hmodule); + static object_ref GetFromHModule(KernelState* kernel_state, + void* hmodule); static uint32_t GetHandleFromHModule(void* hmodule); protected: @@ -92,7 +93,7 @@ class XModule : public XObject { xe::cpu::Module* processor_module_; - uint32_t hmodule_ptr_; // This points to LDR_DATA_TABLE_ENTRY. + uint32_t hmodule_ptr_; // This points to LDR_DATA_TABLE_ENTRY. }; } // namespace kernel diff --git a/src/xenia/kernel/util/xex2_info.h b/src/xenia/kernel/util/xex2_info.h index fa1281935..4d0a5409f 100644 --- a/src/xenia/kernel/util/xex2_info.h +++ b/src/xenia/kernel/util/xex2_info.h @@ -516,9 +516,8 @@ struct xex2_header { struct xex2_loader_info { xe::be header_size; xe::be image_size; - }; -} // namespace kernel -} // namespace xe +} // namespace kernel +} // namespace xe #endif // XENIA_KERNEL_XEX2_INFO_H_ diff --git a/src/xenia/kernel/xboxkrnl_modules.cc b/src/xenia/kernel/xboxkrnl_modules.cc index ac03cce32..468cb8c71 100644 --- a/src/xenia/kernel/xboxkrnl_modules.cc +++ b/src/xenia/kernel/xboxkrnl_modules.cc @@ -278,8 +278,8 @@ SHIM_CALL XexGetProcedureAddress_shim(PPCContext* ppc_context, auto string_name = reinterpret_cast(SHIM_MEM_ADDR(ordinal)); if (is_string_name) { - XELOGD("XexGetProcedureAddress(%.8X, %.8X(%s), %.8X)", hmodule, - ordinal, string_name, out_function_ptr); + XELOGD("XexGetProcedureAddress(%.8X, %.8X(%s), %.8X)", hmodule, ordinal, + string_name, out_function_ptr); } else { XELOGD("XexGetProcedureAddress(%.8X, %.8X, %.8X)", hmodule, ordinal, out_function_ptr);