From 517577d5462bee12fb852eac8b34ff96c5b746a5 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Tue, 29 Aug 2023 23:11:31 +0200 Subject: [PATCH] Improve consistency for including --- cpu/cpu.cpp | 4 ++-- cpu/decoder.cpp | 6 +++--- memory/bus.h | 2 +- memory/mem_device.h | 2 +- memory/ram.cpp | 2 +- memory/ram.h | 2 +- tests/test_bus.cpp | 4 ++-- tests/test_cpu_interrupts.cpp | 4 ++-- tests/test_cpu_simple.cpp | 4 ++-- tests/test_ram.cpp | 3 ++- 10 files changed, 17 insertions(+), 16 deletions(-) diff --git a/cpu/cpu.cpp b/cpu/cpu.cpp index 286a85b..5e44ada 100644 --- a/cpu/cpu.cpp +++ b/cpu/cpu.cpp @@ -1,5 +1,5 @@ -#include "cpu.h" -#include "panic.h" +#include +#include void Cpu_state::setAF(u16 v) { diff --git a/cpu/decoder.cpp b/cpu/decoder.cpp index c6e23f6..92855a4 100644 --- a/cpu/decoder.cpp +++ b/cpu/decoder.cpp @@ -1,6 +1,6 @@ -#include "cpu/cpu.h" -#include "cpu/panic.h" -#include "memory/mem_device.h" +#include +#include +#include static inline u16 make_u16(u8 msb, u8 lsb) { diff --git a/memory/bus.h b/memory/bus.h index 2581d4b..c50bcaa 100644 --- a/memory/bus.h +++ b/memory/bus.h @@ -3,7 +3,7 @@ #include #include -#include "mem_device.h" +#include class Bus : public Mem_device { private: diff --git a/memory/mem_device.h b/memory/mem_device.h index 9f9c5de..73bdcb0 100644 --- a/memory/mem_device.h +++ b/memory/mem_device.h @@ -1,6 +1,6 @@ #pragma once -#include "types.h" +#include class Range { private: diff --git a/memory/ram.cpp b/memory/ram.cpp index 123a4f4..a280ad0 100644 --- a/memory/ram.cpp +++ b/memory/ram.cpp @@ -1,4 +1,4 @@ -#include "ram.h" +#include #include RAM::RAM(u16 size) : size(size), readonly(false) { diff --git a/memory/ram.h b/memory/ram.h index aea65ab..d709fe9 100644 --- a/memory/ram.h +++ b/memory/ram.h @@ -1,6 +1,6 @@ #pragma once -#include "mem_device.h" +#include class RAM : public Mem_device { private: diff --git a/tests/test_bus.cpp b/tests/test_bus.cpp index 351e6e8..c2dc064 100644 --- a/tests/test_bus.cpp +++ b/tests/test_bus.cpp @@ -1,7 +1,7 @@ #include "doctest.h" -#include "memory/bus.h" -#include "memory/ram.h" +#include +#include TEST_CASE("Bus can map same device twice") { diff --git a/tests/test_cpu_interrupts.cpp b/tests/test_cpu_interrupts.cpp index af3fd0c..49d61dc 100644 --- a/tests/test_cpu_interrupts.cpp +++ b/tests/test_cpu_interrupts.cpp @@ -1,7 +1,7 @@ #include "doctest.h" -#include "cpu/cpu.h" -#include "memory/ram.h" +#include +#include TEST_CASE("EI followed by DI should not trigger interrupt") { diff --git a/tests/test_cpu_simple.cpp b/tests/test_cpu_simple.cpp index 0fcf11f..83d2e30 100644 --- a/tests/test_cpu_simple.cpp +++ b/tests/test_cpu_simple.cpp @@ -1,7 +1,7 @@ #include "doctest.h" -#include "cpu/cpu.h" -#include "memory/ram.h" +#include +#include TEST_CASE("simple load and add") diff --git a/tests/test_ram.cpp b/tests/test_ram.cpp index 73e1d33..b960e27 100644 --- a/tests/test_ram.cpp +++ b/tests/test_ram.cpp @@ -1,5 +1,6 @@ #include "doctest.h" -#include "memory/ram.h" + +#include TEST_SUITE_BEGIN("memory/ram");