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/hw.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/core/hw/hw.cpp') diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index b5fdbf9c1..db224c9aa 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp @@ -5,14 +5,14 @@ #include "common/common_types.h" #include "common/logging/log.h" -#include "core/hw/hw.h" #include "core/hw/gpu.h" +#include "core/hw/hw.h" #include "core/hw/lcd.h" namespace HW { template -inline void Read(T &var, const u32 addr) { +inline void Read(T& var, const u32 addr) { switch (addr & 0xFFFFF000) { case VADDR_GPU: case VADDR_GPU + 0x1000: @@ -71,10 +71,10 @@ inline void Write(u32 addr, const T data) { // Explicitly instantiate template functions because we aren't defining this in the header: -template void Read(u64 &var, const u32 addr); -template void Read(u32 &var, const u32 addr); -template void Read(u16 &var, const u32 addr); -template void Read(u8 &var, const u32 addr); +template void Read(u64& var, const u32 addr); +template void Read(u32& var, const u32 addr); +template void Read(u16& var, const u32 addr); +template void Read(u8& var, const u32 addr); template void Write(u32 addr, const u64 data); template void Write(u32 addr, const u32 data); @@ -98,5 +98,4 @@ void Shutdown() { LCD::Shutdown(); LOG_DEBUG(HW, "shutdown OK"); } - } -- cgit v1.2.3 From 396a8d91a4423d9c793eeff0798d544613647511 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 18 Sep 2016 18:01:46 -0700 Subject: Manually tweak source formatting and then re-run clang-format --- src/core/hw/hw.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/hw/hw.cpp') diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index db224c9aa..71f44cbc4 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp @@ -82,8 +82,7 @@ template void Write(u32 addr, const u16 data); template void Write(u32 addr, const u8 data); /// Update hardware -void Update() { -} +void Update() {} /// Initialize hardware void Init() { -- 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/hw.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/hw/hw.cpp') diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index 71f44cbc4..0f84d5adb 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp @@ -2,11 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "core/hw/hw.h" #include "common/common_types.h" #include "common/logging/log.h" - #include "core/hw/gpu.h" -#include "core/hw/hw.h" #include "core/hw/lcd.h" namespace HW { -- cgit v1.2.3 From 84fbbe26297652d994d203bde543ec252c2d801a Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Tue, 20 Sep 2016 23:52:38 -0700 Subject: Use negative priorities to avoid special-casing the self-include --- src/core/hw/hw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hw/hw.cpp') diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index 0f84d5adb..9ff8825b2 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp @@ -2,10 +2,10 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "core/hw/hw.h" #include "common/common_types.h" #include "common/logging/log.h" #include "core/hw/gpu.h" +#include "core/hw/hw.h" #include "core/hw/lcd.h" namespace HW { -- cgit v1.2.3