From 4d7be1c15b6561fe85495d5fdd01b9cafcba60aa Mon Sep 17 00:00:00 2001 From: Allofich <19624336+Allofich@users.noreply.github.com> Date: Sun, 22 Aug 2021 15:13:27 +0900 Subject: [PATCH] Remove redundant #ifndef conditionals for includes --- include/bios_disk.h | 2 -- include/callback.h | 2 -- include/control.h | 2 -- include/cpu.h | 2 -- include/dos_inc.h | 4 +--- include/dos_system.h | 6 ------ include/ipx.h | 2 -- include/mem.h | 2 -- include/midi.h | 2 -- include/paging.h | 2 -- include/parport.h | 2 -- include/programs.h | 2 -- include/regs.h | 2 -- include/serialport.h | 4 ---- include/shell.h | 2 -- include/support.h | 2 -- include/zip.h | 2 -- src/cpu/lazyflags.h | 2 -- 18 files changed, 1 insertion(+), 43 deletions(-) diff --git a/include/bios_disk.h b/include/bios_disk.h index 6b403b7bd..6c8358869 100644 --- a/include/bios_disk.h +++ b/include/bios_disk.h @@ -19,9 +19,7 @@ #ifndef DOSBOX_BIOS_DISK_H #define DOSBOX_BIOS_DISK_H -#ifndef DOSBOX_DOS_INC_H #include "dos_inc.h" -#endif #include "logging.h" #include "../src/dos/cdrom.h" diff --git a/include/callback.h b/include/callback.h index 8f73a1631..ec20bcd88 100644 --- a/include/callback.h +++ b/include/callback.h @@ -20,9 +20,7 @@ #ifndef DOSBOX_CALLBACK_H #define DOSBOX_CALLBACK_H -#ifndef DOSBOX_MEM_H #include "mem.h" -#endif typedef Bitu (*CallBack_Handler)(void); extern CallBack_Handler CallBack_Handlers[]; diff --git a/include/control.h b/include/control.h index 2db8a1bb6..caa79ccfe 100644 --- a/include/control.h +++ b/include/control.h @@ -25,9 +25,7 @@ //#pragma warning ( disable : 4290 ) #endif -#ifndef DOSBOX_PROGRAMS_H #include "programs.h" -#endif #include "setup.h" class Config{ diff --git a/include/cpu.h b/include/cpu.h index 060f8d398..104328f9e 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -20,9 +20,7 @@ #ifndef DOSBOX_CPU_H #define DOSBOX_CPU_H -#ifndef DOSBOX_REGS_H #include "regs.h" -#endif #define CPU_AUTODETERMINE_NONE 0x00 #define CPU_AUTODETERMINE_CORE 0x01 diff --git a/include/dos_inc.h b/include/dos_inc.h index 00bc4287f..f06517d8e 100644 --- a/include/dos_inc.h +++ b/include/dos_inc.h @@ -22,9 +22,7 @@ #define CTBUF 127 -#ifndef DOSBOX_DOS_SYSTEM_H -#include "dos_system.h" -#endif +#include "dos_system.h" #include #include //for offsetof diff --git a/include/dos_system.h b/include/dos_system.h index 3ab3fc4cb..e756adedf 100644 --- a/include/dos_system.h +++ b/include/dos_system.h @@ -20,16 +20,10 @@ #ifndef DOSBOX_DOS_SYSTEM_H #define DOSBOX_DOS_SYSTEM_H -#ifndef DOSBOX_CROSS_H #include "cross.h" -#endif #include "string.h" -#ifndef DOSBOX_SUPPORT_H #include "support.h" -#endif -#ifndef DOSBOX_MEM_H #include "mem.h" -#endif #define DOS_NAMELENGTH 12u #define DOS_NAMELENGTH_ASCII (DOS_NAMELENGTH+1) diff --git a/include/ipx.h b/include/ipx.h index e8e10ff2e..11b823ac1 100644 --- a/include/ipx.h +++ b/include/ipx.h @@ -33,9 +33,7 @@ #endif #endif -#ifndef DOSBOX_MEM_H #include "mem.h" -#endif // In Use Flag codes #define USEFLAG_AVAILABLE 0x00 diff --git a/include/mem.h b/include/mem.h index 0992276f4..2a19e0764 100644 --- a/include/mem.h +++ b/include/mem.h @@ -19,9 +19,7 @@ #ifndef DOSBOX_MEM_H #define DOSBOX_MEM_H -#ifndef DOSBOX_DOSBOX_H #include "dosbox.h" -#endif #include "byteorder.h" diff --git a/include/midi.h b/include/midi.h index 727762ea4..12c8c4b2c 100644 --- a/include/midi.h +++ b/include/midi.h @@ -20,9 +20,7 @@ #ifndef DOSBOX_MIDI_H #define DOSBOX_MIDI_H -#ifndef DOSBOX_PROGRAMS_H #include "programs.h" -#endif class MidiHandler { public: diff --git a/include/paging.h b/include/paging.h index 879c5843b..7e86a4cab 100644 --- a/include/paging.h +++ b/include/paging.h @@ -20,9 +20,7 @@ #ifndef DOSBOX_PAGING_H #define DOSBOX_PAGING_H -#ifndef DOSBOX_MEM_H #include "mem.h" -#endif // disable this to reduce the size of the TLB // NOTE: does not work with the dynamic core (dynrec is fine) diff --git a/include/parport.h b/include/parport.h index 6000f7e33..4e0a35016 100644 --- a/include/parport.h +++ b/include/parport.h @@ -22,9 +22,7 @@ // set to 1 for debug messages and debugging log: #define PARALLEL_DEBUG 0 -#ifndef DOSBOX_INOUT_H #include "inout.h" -#endif #include "programs.h" diff --git a/include/programs.h b/include/programs.h index 829d680b6..c2e0e8432 100644 --- a/include/programs.h +++ b/include/programs.h @@ -20,9 +20,7 @@ #ifndef DOSBOX_PROGRAMS_H #define DOSBOX_PROGRAMS_H -#ifndef DOSBOX_DOS_INC_H #include "dos_inc.h" -#endif class CommandLine { public: diff --git a/include/regs.h b/include/regs.h index 4025f80c6..8b4dab325 100644 --- a/include/regs.h +++ b/include/regs.h @@ -19,9 +19,7 @@ #ifndef DOSBOX_REGS_H #define DOSBOX_REGS_H -#ifndef DOSBOX_MEM_H #include "mem.h" -#endif #define FLAG_CF 0x00000001U #define FLAG_PF 0x00000004U diff --git a/include/serialport.h b/include/serialport.h index 10c325729..872d14c37 100644 --- a/include/serialport.h +++ b/include/serialport.h @@ -20,12 +20,8 @@ #ifndef DOSBOX_SERIALPORT_H #define DOSBOX_SERIALPORT_H -#ifndef DOSBOX_INOUT_H #include "inout.h" -#endif -#ifndef DOSBOX_PROGRAMS_H #include "programs.h" -#endif // set this to 1 for serial debugging in release mode #define SERIAL_DBG_FORCED 1 diff --git a/include/shell.h b/include/shell.h index 8d06f82c9..f061ab5e1 100644 --- a/include/shell.h +++ b/include/shell.h @@ -20,9 +20,7 @@ #ifndef DOSBOX_SHELL_H #define DOSBOX_SHELL_H -#ifndef DOSBOX_PROGRAMS_H #include "programs.h" -#endif #include #if SDL_VERSION_ATLEAST(2, 0, 0) diff --git a/include/support.h b/include/support.h index 0aae593a6..2b106f9ec 100644 --- a/include/support.h +++ b/include/support.h @@ -20,9 +20,7 @@ #ifndef DOSBOX_SUPPORT_H #define DOSBOX_SUPPORT_H -#ifndef DOSBOX_DOSBOX_H #include "dosbox.h" -#endif #if defined (_MSC_VER) /* MS Visual C++ */ #define strcasecmp(a,b) stricmp(a,b) diff --git a/include/zip.h b/include/zip.h index 8aaebb623..6d045ca6f 100644 --- a/include/zip.h +++ b/include/zip.h @@ -46,9 +46,7 @@ extern "C" { //#define HAVE_BZIP2 -#ifndef _ZLIB_H #include "zlib.h" -#endif #ifndef _ZLIBIOAPI_H #include "ioapi.h" diff --git a/src/cpu/lazyflags.h b/src/cpu/lazyflags.h index b544da215..8d4f63363 100644 --- a/src/cpu/lazyflags.h +++ b/src/cpu/lazyflags.h @@ -31,9 +31,7 @@ Bitu FillFlags(void); void FillFlagsNoCFOF(void); void DestroyConditionFlags(void); -#ifndef DOSBOX_REGS_H #include "regs.h" -#endif struct LazyFlags { GenReg32 var1,var2,res;