From b77ba1d87d76e5885ee62094acf51c3d943dd142 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Mon, 26 Aug 2024 22:45:25 -0400 Subject: [PATCH] Forward declare `struct Section` to avoid a nested header `include` --- include/link/output.hpp | 2 +- src/asm/opt.cpp | 1 - src/link/output.cpp | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/link/output.hpp b/include/link/output.hpp index 801947db..2a9af0ea 100644 --- a/include/link/output.hpp +++ b/include/link/output.hpp @@ -3,7 +3,7 @@ #ifndef RGBDS_LINK_OUTPUT_HPP #define RGBDS_LINK_OUTPUT_HPP -#include "link/section.hpp" +struct Section; /* * Registers a section for output. diff --git a/src/asm/opt.cpp b/src/asm/opt.cpp index 66f10e4d..dc2cb83a 100644 --- a/src/asm/opt.cpp +++ b/src/asm/opt.cpp @@ -10,7 +10,6 @@ #include "asm/fixpoint.hpp" #include "asm/fstack.hpp" #include "asm/lexer.hpp" -#include "asm/main.hpp" #include "asm/section.hpp" #include "asm/warning.hpp" diff --git a/src/link/output.cpp b/src/link/output.cpp index 12bef578..9ce02b96 100644 --- a/src/link/output.cpp +++ b/src/link/output.cpp @@ -17,6 +17,7 @@ #include "platform.hpp" #include "link/main.hpp" +#include "link/section.hpp" #include "link/symbol.hpp" #define BANK_SIZE 0x4000