diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-09-18 09:38:01 +0900 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-09-18 09:38:01 +0900 |
commit | dc8479928c5aee4c6ad6fe4f59006fb604cee701 (patch) | |
tree | 569a7f13128450bbab973236615587ff00bced5f /src/core/hw/lcd.h | |
parent | fe948af0952d7badacbce62a8e35a3a1421245ba (diff) |
Sources: Run clang-format on everything.
Diffstat (limited to 'src/core/hw/lcd.h')
-rw-r--r-- | src/core/hw/lcd.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.h index 57029c5e86..404833165c 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<const u32*>(this); return content[index]; } - u32& operator [] (int index) { + u32& operator[](int index) { u32* content = reinterpret_cast<u32*>(this); return content[index]; } - }; static_assert(std::is_standard_layout<Regs>::value, "Structure does not use standard layout"); @@ -59,14 +58,14 @@ static_assert(std::is_standard_layout<Regs>::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 <typename T> -void Read(T &var, const u32 addr); +void Read(T& var, const u32 addr); template <typename T> void Write(u32 addr, const T data); |