From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/core/hw/lcd.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/core/hw/lcd.h') diff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.h index 57029c5e8..404833165 100644 --- a/src/core/hw/lcd.h +++ b/src/core/hw/lcd.h @@ -42,16 +42,15 @@ struct Regs { return sizeof(Regs) / sizeof(u32); } - const u32& operator [] (int index) const { + const u32& operator[](int index) const { const u32* content = reinterpret_cast(this); return content[index]; } - u32& operator [] (int index) { + u32& operator[](int index) { u32* content = reinterpret_cast(this); return content[index]; } - }; static_assert(std::is_standard_layout::value, "Structure does not use standard layout"); @@ -59,14 +58,14 @@ static_assert(std::is_standard_layout::value, "Structure does not use stan // is technically allowed since C++11. This macro should be enabled once MSVC adds // support for that. #ifndef _MSC_VER -#define ASSERT_REG_POSITION(field_name, position) \ - static_assert(offsetof(Regs, field_name) == position * 4, \ - "Field "#field_name" has invalid position") +#define ASSERT_REG_POSITION(field_name, position) \ + static_assert(offsetof(Regs, field_name) == position * 4, \ + "Field " #field_name " has invalid position") -ASSERT_REG_POSITION(color_fill_top, 0x81); -ASSERT_REG_POSITION(backlight_top, 0x90); +ASSERT_REG_POSITION(color_fill_top, 0x81); +ASSERT_REG_POSITION(backlight_top, 0x90); ASSERT_REG_POSITION(color_fill_bottom, 0x281); -ASSERT_REG_POSITION(backlight_bottom, 0x290); +ASSERT_REG_POSITION(backlight_bottom, 0x290); #undef ASSERT_REG_POSITION #endif // !defined(_MSC_VER) @@ -74,7 +73,7 @@ ASSERT_REG_POSITION(backlight_bottom, 0x290); extern Regs g_regs; template -void Read(T &var, const u32 addr); +void Read(T& var, const u32 addr); template void Write(u32 addr, const T data); -- cgit v1.2.3 From ebdae19fd226104baec712b9da9939ff82ef3c3a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 21 Sep 2016 00:21:23 +0900 Subject: Remove empty newlines in #include blocks. This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation. --- src/core/hw/lcd.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/hw/lcd.h') diff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.h index 404833165..191fd44af 100644 --- a/src/core/hw/lcd.h +++ b/src/core/hw/lcd.h @@ -6,7 +6,6 @@ #include #include - #include "common/bit_field.h" #include "common/common_funcs.h" #include "common/common_types.h" -- cgit v1.2.3