summaryrefslogtreecommitdiffstats
path: root/src/core/hw/lcd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hw/lcd.h')
-rw-r--r--src/core/hw/lcd.h19
1 files changed, 9 insertions, 10 deletions
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<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);