From b01323165e251d9444d80fb8e4688717d68769e4 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Wed, 21 Feb 2024 22:06:03 +0100 Subject: [PATCH] Add missing pragma once (#1120) --- src/game/client/draw/tintenvelope.h | 1 + src/game/client/gui/challengegenerals.h | 1 + src/game/client/w3dassetmanager.h | 2 ++ src/game/common/mapobject.h | 2 ++ src/game/common/rts/productionprerequisite.h | 5 ----- src/game/common/thing/thingtemplate.h | 5 ----- src/game/logic/object/armortemplateset.h | 5 ----- src/game/logic/object/objectcreationlist.h | 1 + src/game/logic/object/weapontemplateset.h | 5 ----- src/tools/w3dviewer/colorutils.h | 3 +++ src/tools/w3dviewer/emitterlinegroupproppage.h | 2 ++ src/tools/w3dviewer/emitterlineproppage.h | 2 ++ src/tools/w3dviewer/emitterparticleproppage.h | 2 ++ src/tools/w3dviewer/emitterphysicsproppage.h | 2 ++ src/tools/w3dviewer/emitterrotationproppage.h | 2 ++ src/tools/w3dviewer/emittersizeproppage.h | 2 ++ src/tools/w3dviewer/emitteruserproppage.h | 2 ++ src/w3d/lib/slist.h | 3 +++ src/w3d/renderer/line3d.h | 2 ++ 19 files changed, 29 insertions(+), 20 deletions(-) diff --git a/src/game/client/draw/tintenvelope.h b/src/game/client/draw/tintenvelope.h index c9b5fb23d..2e09dd5f4 100644 --- a/src/game/client/draw/tintenvelope.h +++ b/src/game/client/draw/tintenvelope.h @@ -12,6 +12,7 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once #include "always.h" #include "mempoolobj.h" diff --git a/src/game/client/gui/challengegenerals.h b/src/game/client/gui/challengegenerals.h index de2626fe6..17f319f2a 100644 --- a/src/game/client/gui/challengegenerals.h +++ b/src/game/client/gui/challengegenerals.h @@ -12,6 +12,7 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once #include "always.h" #include "asciistring.h" diff --git a/src/game/client/w3dassetmanager.h b/src/game/client/w3dassetmanager.h index 6584c5763..366fcbcb5 100644 --- a/src/game/client/w3dassetmanager.h +++ b/src/game/client/w3dassetmanager.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "asciistring.h" #include "assetmgr.h" #include "mempoolobj.h" diff --git a/src/game/common/mapobject.h b/src/game/common/mapobject.h index 0007d07ba..9046b5dd8 100644 --- a/src/game/common/mapobject.h +++ b/src/game/common/mapobject.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "always.h" #include "asciistring.h" #include "coord.h" diff --git a/src/game/common/rts/productionprerequisite.h b/src/game/common/rts/productionprerequisite.h index 7d0fa8628..4a67f3a38 100644 --- a/src/game/common/rts/productionprerequisite.h +++ b/src/game/common/rts/productionprerequisite.h @@ -14,9 +14,6 @@ */ #pragma once -#ifndef PRODUCTIONPREREQUISITE_H -#define PRODUCTIONPREREQUISITE_H - #include "always.h" #include "asciistring.h" #include "science.h" @@ -58,5 +55,3 @@ class ProductionPrerequisite std::vector m_prereqUnit; std::vector m_prereqScience; }; - -#endif // PRODUCTIONPREREQUISITE_H diff --git a/src/game/common/thing/thingtemplate.h b/src/game/common/thing/thingtemplate.h index f226cb610..d2a01a4bb 100644 --- a/src/game/common/thing/thingtemplate.h +++ b/src/game/common/thing/thingtemplate.h @@ -14,9 +14,6 @@ */ #pragma once -#ifndef THINGTEMPLATE_H -#define THINGTEMPLATE_H - #include "always.h" #include "armortemplateset.h" #include "asciistring.h" @@ -421,5 +418,3 @@ class ThingTemplate : public Overridable static const FieldParse s_objectFieldParseTable[]; static const FieldParse s_objectReskinFieldParseTable[]; }; - -#endif // THINGTEMPLATE_H diff --git a/src/game/logic/object/armortemplateset.h b/src/game/logic/object/armortemplateset.h index f54995a96..ec556bfad 100644 --- a/src/game/logic/object/armortemplateset.h +++ b/src/game/logic/object/armortemplateset.h @@ -14,9 +14,6 @@ */ #pragma once -#ifndef ARMORTEMPLATESET_H -#define ARMORTEMPLATESET_H - #include "always.h" #include "bitflags.h" #include "ini.h" @@ -54,5 +51,3 @@ class ArmorTemplateSet ArmorTemplate *m_template; DamageFX *m_fx; }; - -#endif // ARMORTEMPLATESET_H diff --git a/src/game/logic/object/objectcreationlist.h b/src/game/logic/object/objectcreationlist.h index a498822a0..72c686a35 100644 --- a/src/game/logic/object/objectcreationlist.h +++ b/src/game/logic/object/objectcreationlist.h @@ -12,6 +12,7 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once #include "mempoolobj.h" #include "namekeygenerator.h" diff --git a/src/game/logic/object/weapontemplateset.h b/src/game/logic/object/weapontemplateset.h index 30b5d153f..ab9ef0553 100644 --- a/src/game/logic/object/weapontemplateset.h +++ b/src/game/logic/object/weapontemplateset.h @@ -14,9 +14,6 @@ */ #pragma once -#ifndef WEAPONTEMPLATESET_H -#define WEAPONTEMPLATESET_H - #include "always.h" #include "bitflags.h" #include "gametype.h" @@ -82,5 +79,3 @@ class WeaponTemplateSet bool m_shareWeaponReloadTime; bool m_weaponLockSharedAcrossSets; }; - -#endif // WEAPONTEMPLATESET_H diff --git a/src/tools/w3dviewer/colorutils.h b/src/tools/w3dviewer/colorutils.h index 228b1ef02..fb878464e 100644 --- a/src/tools/w3dviewer/colorutils.h +++ b/src/tools/w3dviewer/colorutils.h @@ -12,7 +12,10 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "w3dafx.h" + void DrawSunkenRect(BYTE *bits, RECT *rect, int stride); void DrawRaisedRect(BYTE *bits, RECT *rect, int stride); void DrawOutlinedRect(BYTE *bits, RECT *rect, int color, int stride); diff --git a/src/tools/w3dviewer/emitterlinegroupproppage.h b/src/tools/w3dviewer/emitterlinegroupproppage.h index 5b5ea6554..8dcbde9f5 100644 --- a/src/tools/w3dviewer/emitterlinegroupproppage.h +++ b/src/tools/w3dviewer/emitterlinegroupproppage.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "w3dafx.h" #include "part_emt.h" diff --git a/src/tools/w3dviewer/emitterlineproppage.h b/src/tools/w3dviewer/emitterlineproppage.h index ad6e688aa..dba291cbb 100644 --- a/src/tools/w3dviewer/emitterlineproppage.h +++ b/src/tools/w3dviewer/emitterlineproppage.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "w3dafx.h" class EmitterInstanceList; diff --git a/src/tools/w3dviewer/emitterparticleproppage.h b/src/tools/w3dviewer/emitterparticleproppage.h index 2c16da371..77c5ed831 100644 --- a/src/tools/w3dviewer/emitterparticleproppage.h +++ b/src/tools/w3dviewer/emitterparticleproppage.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "w3dafx.h" class EmitterInstanceList; diff --git a/src/tools/w3dviewer/emitterphysicsproppage.h b/src/tools/w3dviewer/emitterphysicsproppage.h index ce8b22e25..70e27ad6e 100644 --- a/src/tools/w3dviewer/emitterphysicsproppage.h +++ b/src/tools/w3dviewer/emitterphysicsproppage.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "w3dafx.h" #include "vector3.h" diff --git a/src/tools/w3dviewer/emitterrotationproppage.h b/src/tools/w3dviewer/emitterrotationproppage.h index a5c344d28..548e45510 100644 --- a/src/tools/w3dviewer/emitterrotationproppage.h +++ b/src/tools/w3dviewer/emitterrotationproppage.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "w3dafx.h" #include "part_emt.h" diff --git a/src/tools/w3dviewer/emittersizeproppage.h b/src/tools/w3dviewer/emittersizeproppage.h index 6fb72b664..6f590f5ea 100644 --- a/src/tools/w3dviewer/emittersizeproppage.h +++ b/src/tools/w3dviewer/emittersizeproppage.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "w3dafx.h" #include "part_emt.h" diff --git a/src/tools/w3dviewer/emitteruserproppage.h b/src/tools/w3dviewer/emitteruserproppage.h index 88877a2d8..9d5d7564d 100644 --- a/src/tools/w3dviewer/emitteruserproppage.h +++ b/src/tools/w3dviewer/emitteruserproppage.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "w3dafx.h" class EmitterInstanceList; diff --git a/src/w3d/lib/slist.h b/src/w3d/lib/slist.h index 2ba4fa430..9b174d3ef 100644 --- a/src/w3d/lib/slist.h +++ b/src/w3d/lib/slist.h @@ -12,8 +12,11 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "always.h" #include "autopool.h" + template class SList; class GenericSLNode : public AutoPoolClass diff --git a/src/w3d/renderer/line3d.h b/src/w3d/renderer/line3d.h index 297c62144..545ff80c4 100644 --- a/src/w3d/renderer/line3d.h +++ b/src/w3d/renderer/line3d.h @@ -12,6 +12,8 @@ * A full copy of the GNU General Public License can be found in * LICENSE */ +#pragma once + #include "always.h" #include "rendobj.h" #include "shader.h"