From 245dac814ee84bcb1403a0c95f6a1f0a6d0c2734 Mon Sep 17 00:00:00 2001 From: l2ksolkov Date: Sun, 28 May 2023 20:29:24 -0700 Subject: [PATCH] Add missing include guards --- src/common/console/c_commandbuffer.h | 1 + src/common/console/c_consolebuffer.h | 1 + src/common/engine/serializer_internal.h | 1 + src/common/filesystem/ancientzip.h | 1 + src/common/platform/win32/winres.h | 1 + src/common/rendering/hwrenderer/data/hw_viewpointbuffer.h | 2 +- src/common/scripting/jit/jitintern.h | 2 +- src/common/textures/animlib.h | 1 + src/common/textures/hires/hqnx_asm/hqnx_asm_Image.h | 1 + src/common/utility/weightedlist.h | 1 + src/d_defcvars.h | 1 + src/g_pch.h | 1 + src/g_pch2.h | 1 + src/gamedata/doomfont.h | 1 + src/r_data/r_vanillatrans.h | 1 + src/rendering/hwrenderer/hw_vertexbuilder.h | 2 +- src/rendering/swrenderer/textures/warpbuffer.h | 1 + 17 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/common/console/c_commandbuffer.h b/src/common/console/c_commandbuffer.h index 179651c45b..637027b27c 100644 --- a/src/common/console/c_commandbuffer.h +++ b/src/common/console/c_commandbuffer.h @@ -1,3 +1,4 @@ +#pragma once #include #include "zstring.h" diff --git a/src/common/console/c_consolebuffer.h b/src/common/console/c_consolebuffer.h index 58bc0edea3..8d4e235d58 100644 --- a/src/common/console/c_consolebuffer.h +++ b/src/common/console/c_consolebuffer.h @@ -32,6 +32,7 @@ **--------------------------------------------------------------------------- ** */ +#pragma once #include #include diff --git a/src/common/engine/serializer_internal.h b/src/common/engine/serializer_internal.h index 31cf76c1ae..05b6dcad0f 100644 --- a/src/common/engine/serializer_internal.h +++ b/src/common/engine/serializer_internal.h @@ -1,3 +1,4 @@ +#pragma once const char* UnicodeToString(const char* cc); const char* StringToUnicode(const char* cc, int size = -1); diff --git a/src/common/filesystem/ancientzip.h b/src/common/filesystem/ancientzip.h index 621505504c..6241f775df 100644 --- a/src/common/filesystem/ancientzip.h +++ b/src/common/filesystem/ancientzip.h @@ -1,3 +1,4 @@ +#pragma once #include "files.h" #include "engineerrors.h" diff --git a/src/common/platform/win32/winres.h b/src/common/platform/win32/winres.h index 6d78230d84..a2b8711a6a 100644 --- a/src/common/platform/win32/winres.h +++ b/src/common/platform/win32/winres.h @@ -10,6 +10,7 @@ // winres.h - Windows resource definitions // extracted from WINUSER.H and COMMCTRL.H +#pragma once #ifdef _AFX_MINREBUILD #pragma component(minrebuild, off) diff --git a/src/common/rendering/hwrenderer/data/hw_viewpointbuffer.h b/src/common/rendering/hwrenderer/data/hw_viewpointbuffer.h index f52af7ebc6..8efe61738f 100644 --- a/src/common/rendering/hwrenderer/data/hw_viewpointbuffer.h +++ b/src/common/rendering/hwrenderer/data/hw_viewpointbuffer.h @@ -1,4 +1,4 @@ - +#pragma once #include "tarray.h" #include "hwrenderer/data/buffers.h" diff --git a/src/common/scripting/jit/jitintern.h b/src/common/scripting/jit/jitintern.h index aaf8d70a65..05dfd62dfc 100644 --- a/src/common/scripting/jit/jitintern.h +++ b/src/common/scripting/jit/jitintern.h @@ -1,4 +1,4 @@ - +#pragma once #include "jit.h" #include "types.h" diff --git a/src/common/textures/animlib.h b/src/common/textures/animlib.h index 23d0d89da7..661f00fb28 100644 --- a/src/common/textures/animlib.h +++ b/src/common/textures/animlib.h @@ -24,6 +24,7 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) */ //------------------------------------------------------------------------- +#pragma once #include ///////////////////////////////////////////////////////////////////////////// diff --git a/src/common/textures/hires/hqnx_asm/hqnx_asm_Image.h b/src/common/textures/hires/hqnx_asm/hqnx_asm_Image.h index 918b904fe2..6e2a931081 100644 --- a/src/common/textures/hires/hqnx_asm/hqnx_asm_Image.h +++ b/src/common/textures/hires/hqnx_asm/hqnx_asm_Image.h @@ -19,6 +19,7 @@ //#ifdef WIN32 //#define DLL __declspec(dllexport) //#else +#pragma once #define DLL //#endif diff --git a/src/common/utility/weightedlist.h b/src/common/utility/weightedlist.h index cd6a4ba0ed..fb956a4625 100644 --- a/src/common/utility/weightedlist.h +++ b/src/common/utility/weightedlist.h @@ -31,6 +31,7 @@ **--------------------------------------------------------------------------- ** */ +#pragma once #include #include diff --git a/src/d_defcvars.h b/src/d_defcvars.h index 73f110c707..8bf3d7c185 100644 --- a/src/d_defcvars.h +++ b/src/d_defcvars.h @@ -19,6 +19,7 @@ // defcvars loader split from d_main.cpp // //----------------------------------------------------------------------------- +#pragma once #define SHOULD_BLACKLIST(name) \ if (#name[0]==CurrentFindCVar[0]) \ diff --git a/src/g_pch.h b/src/g_pch.h index bad3eda563..cf3dfdbd52 100644 --- a/src/g_pch.h +++ b/src/g_pch.h @@ -1,3 +1,4 @@ +#pragma once #include #include #include diff --git a/src/g_pch2.h b/src/g_pch2.h index 4cd69197e0..f5871488a0 100644 --- a/src/g_pch2.h +++ b/src/g_pch2.h @@ -1,4 +1,5 @@ // This is separate because the files being compiled with it use different compiler settings which may affect how the header is compiled +#pragma once #include #include #include diff --git a/src/gamedata/doomfont.h b/src/gamedata/doomfont.h index 9b44a480f3..b9d14db7d4 100644 --- a/src/gamedata/doomfont.h +++ b/src/gamedata/doomfont.h @@ -1,6 +1,7 @@ // // Globally visible constants. // +#pragma once #define HU_FONTSTART uint8_t('!') // the first font characters #define HU_FONTEND uint8_t('\377') // the last font characters diff --git a/src/r_data/r_vanillatrans.h b/src/r_data/r_vanillatrans.h index 702fc82123..d6b6a5d9ee 100644 --- a/src/r_data/r_vanillatrans.h +++ b/src/r_data/r_vanillatrans.h @@ -30,6 +30,7 @@ **--------------------------------------------------------------------------- ** */ +#pragma once void UpdateVanillaTransparency(); diff --git a/src/rendering/hwrenderer/hw_vertexbuilder.h b/src/rendering/hwrenderer/hw_vertexbuilder.h index 4fbe9916f3..0444613be6 100644 --- a/src/rendering/hwrenderer/hw_vertexbuilder.h +++ b/src/rendering/hwrenderer/hw_vertexbuilder.h @@ -1,4 +1,4 @@ - +#pragma once #include "tarray.h" #include "r_defs.h" struct vertex_t; diff --git a/src/rendering/swrenderer/textures/warpbuffer.h b/src/rendering/swrenderer/textures/warpbuffer.h index 7787068505..594903a536 100644 --- a/src/rendering/swrenderer/textures/warpbuffer.h +++ b/src/rendering/swrenderer/textures/warpbuffer.h @@ -31,6 +31,7 @@ **--------------------------------------------------------------------------- ** */ +#pragma once #include "textures.h" #include "texturemanager.h"