From 651c8c3d25474fe6a926bd4217b3763f263cf02f Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 7 Aug 2016 19:24:26 +1000 Subject: [PATCH] #pragma once --- qcsrc/dpdefs/csprogsdefs.qh | 5 +---- qcsrc/dpdefs/dpextensions.qh | 5 +---- qcsrc/dpdefs/keycodes.qh | 5 +---- qcsrc/dpdefs/menudefs.qh | 5 +---- qcsrc/dpdefs/progsdefs.qh | 5 +---- qcsrc/lib/csqcmodel/cl_model.qh | 4 +--- qcsrc/lib/csqcmodel/cl_player.qh | 4 +--- qcsrc/lib/csqcmodel/common.qh | 4 +--- qcsrc/lib/csqcmodel/interpolate.qh | 4 +--- qcsrc/lib/csqcmodel/settings.qh | 4 +--- qcsrc/lib/csqcmodel/sv_model.qh | 4 +--- qcsrc/lib/p99.qh | 5 +---- qcsrc/lib/warpzone/anglestransform.qh | 4 +--- qcsrc/lib/warpzone/client.qh | 4 +--- qcsrc/lib/warpzone/common.qh | 4 +--- qcsrc/lib/warpzone/mathlib.qh | 5 +---- qcsrc/lib/warpzone/server.qh | 5 +---- qcsrc/lib/warpzone/util_server.qh | 4 +--- 18 files changed, 18 insertions(+), 62 deletions(-) diff --git a/qcsrc/dpdefs/csprogsdefs.qh b/qcsrc/dpdefs/csprogsdefs.qh index f424d1a5d..29d797585 100644 --- a/qcsrc/dpdefs/csprogsdefs.qh +++ b/qcsrc/dpdefs/csprogsdefs.qh @@ -1,5 +1,4 @@ -#ifndef CSPROGSDEFS_H -#define CSPROGSDEFS_H +#pragma once #pragma noref 1 @@ -44,5 +43,3 @@ #define use use1 .void(entity this, entity actor, entity trigger) use; #define touch move_touch - -#endif diff --git a/qcsrc/dpdefs/dpextensions.qh b/qcsrc/dpdefs/dpextensions.qh index ff9214844..2ed0f9063 100644 --- a/qcsrc/dpdefs/dpextensions.qh +++ b/qcsrc/dpdefs/dpextensions.qh @@ -1,5 +1,4 @@ -#ifndef DPEXTENSIONS_H -#define DPEXTENSIONS_H +#pragma once #pragma noref 1 @@ -64,5 +63,3 @@ int() _buf_create = #460; #define buf_create _buf_create #pragma noref 0 - -#endif diff --git a/qcsrc/dpdefs/keycodes.qh b/qcsrc/dpdefs/keycodes.qh index f4c49f143..0267be882 100644 --- a/qcsrc/dpdefs/keycodes.qh +++ b/qcsrc/dpdefs/keycodes.qh @@ -1,5 +1,4 @@ -#ifndef KEYCODES_H -#define KEYCODES_H +#pragma once #pragma noref 1 @@ -10,5 +9,3 @@ //#undef float #pragma noref 0 - -#endif diff --git a/qcsrc/dpdefs/menudefs.qh b/qcsrc/dpdefs/menudefs.qh index 939a86adb..036d87ff2 100644 --- a/qcsrc/dpdefs/menudefs.qh +++ b/qcsrc/dpdefs/menudefs.qh @@ -1,5 +1,4 @@ -#ifndef MENUDEFS_H -#define MENUDEFS_H +#pragma once #pragma noref 1 @@ -43,5 +42,3 @@ int() _buf_create = #440; bool(entity ent) wasfreed = #353; #pragma noref 0 - -#endif diff --git a/qcsrc/dpdefs/progsdefs.qh b/qcsrc/dpdefs/progsdefs.qh index e2668a54b..ccdf9bc0c 100644 --- a/qcsrc/dpdefs/progsdefs.qh +++ b/qcsrc/dpdefs/progsdefs.qh @@ -1,5 +1,4 @@ -#ifndef PROGSDEFS_H -#define PROGSDEFS_H +#pragma once #pragma noref 1 @@ -30,5 +29,3 @@ MACRO_END #define use use1 .void(entity this, entity actor, entity trigger) use; - -#endif diff --git a/qcsrc/lib/csqcmodel/cl_model.qh b/qcsrc/lib/csqcmodel/cl_model.qh index 3b20972e2..b5d9f8bd3 100644 --- a/qcsrc/lib/csqcmodel/cl_model.qh +++ b/qcsrc/lib/csqcmodel/cl_model.qh @@ -19,8 +19,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#ifndef LIB_CSQCMODEL_CL_MODEL_H -#define LIB_CSQCMODEL_CL_MODEL_H +#pragma once #include "common.qh" @@ -50,4 +49,3 @@ void CSQCModel_InterpolateAnimation_1To2_Note(entity this, int sf, float set_tim void CSQCModel_InterpolateAnimation_2To4_Do(entity this); void CSQCModel_InterpolateAnimation_1To2_Do(entity this); // will overwrite lerpfrac, lerpfrac3, lerpfrac4, and possibly clear frame*time if they are undisplayed according to lerpfracs -#endif diff --git a/qcsrc/lib/csqcmodel/cl_player.qh b/qcsrc/lib/csqcmodel/cl_player.qh index 513875aa9..297e2e69d 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qh +++ b/qcsrc/lib/csqcmodel/cl_player.qh @@ -19,8 +19,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#ifndef LIB_CSQCMODEL_CL_PLAYER_H -#define LIB_CSQCMODEL_CL_PLAYER_H +#pragma once bool autocvar_cl_movement = true; @@ -42,4 +41,3 @@ void CSQCPlayer_SetCamera(); float CSQCPlayer_PreUpdate(entity this); float CSQCPlayer_PostUpdate(entity this); float CSQCPlayer_IsLocalPlayer(entity this); -#endif diff --git a/qcsrc/lib/csqcmodel/common.qh b/qcsrc/lib/csqcmodel/common.qh index a700f3af2..37b88997e 100644 --- a/qcsrc/lib/csqcmodel/common.qh +++ b/qcsrc/lib/csqcmodel/common.qh @@ -19,8 +19,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#ifndef LIB_CSQCMODEL_COMMON_H -#define LIB_CSQCMODEL_COMMON_H +#pragma once #include @@ -94,4 +93,3 @@ const int CSQCMODEL_PROPERTY_SIZE = BIT(15); #else #define ALLPROPERTIES ALLPROPERTIES_COMMON #endif -#endif diff --git a/qcsrc/lib/csqcmodel/interpolate.qh b/qcsrc/lib/csqcmodel/interpolate.qh index 2f4828053..3ea385cbc 100644 --- a/qcsrc/lib/csqcmodel/interpolate.qh +++ b/qcsrc/lib/csqcmodel/interpolate.qh @@ -19,8 +19,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#ifndef LIB_CSQCMODEL_INTERPOLATE_H -#define LIB_CSQCMODEL_INTERPOLATE_H +#pragma once .int iflags; const int IFLAG_VELOCITY = BIT(0); @@ -49,4 +48,3 @@ void InterpolateOrigin_Do(entity this); // in case we interpolate that: .vector v_angle; -#endif diff --git a/qcsrc/lib/csqcmodel/settings.qh b/qcsrc/lib/csqcmodel/settings.qh index 85b8a4fcb..359cf1738 100644 --- a/qcsrc/lib/csqcmodel/settings.qh +++ b/qcsrc/lib/csqcmodel/settings.qh @@ -1,5 +1,4 @@ -#ifndef LIB_CSQCMODEL_SETTINGS_H -#define LIB_CSQCMODEL_SETTINGS_H +#pragma once // define this if svqc code wants to use .frame2 and .lerpfrac //#define CSQCMODEL_HAVE_TWO_FRAMES @@ -24,4 +23,3 @@ //vector PL_CROUCH_MIN = ...; //vector PL_CROUCH_MAX = ...; //vector PL_CROUCH_VIEW_OFS = ...; -#endif diff --git a/qcsrc/lib/csqcmodel/sv_model.qh b/qcsrc/lib/csqcmodel/sv_model.qh index 3e043d353..e963f12a1 100644 --- a/qcsrc/lib/csqcmodel/sv_model.qh +++ b/qcsrc/lib/csqcmodel/sv_model.qh @@ -19,8 +19,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#ifndef LIB_CSQCMODEL_SV_MODEL_H -#define LIB_CSQCMODEL_SV_MODEL_H +#pragma once #include "common.qh" @@ -41,4 +40,3 @@ void CSQCModel_UnlinkEntity(entity e); #undef CSQCMODEL_PROPERTY #undef CSQCMODEL_ENDIF #undef CSQCMODEL_IF -#endif diff --git a/qcsrc/lib/p99.qh b/qcsrc/lib/p99.qh index d3228d47c..927410cde 100644 --- a/qcsrc/lib/p99.qh +++ b/qcsrc/lib/p99.qh @@ -12,8 +12,7 @@ /* without even the implied warranty of merchantability or fitness for a */ /* particular purpose. */ /* */ -#ifndef P99_H_ -#define P99_H_ +#pragma once #define P99_MAX_NUMBER 16 #define P00_ARG( \ @@ -83,5 +82,3 @@ P99_PASTE2(P99_PASTE3(_1, _2, _3), _4) #define P99_PASTE5(_1, _2, _3, _4, _5) \ P99_PASTE2(P99_PASTE4(_1, _2, _3, _4), _5) - -#endif /* !P99_H_ */ diff --git a/qcsrc/lib/warpzone/anglestransform.qh b/qcsrc/lib/warpzone/anglestransform.qh index 0a10843c0..b287651a1 100644 --- a/qcsrc/lib/warpzone/anglestransform.qh +++ b/qcsrc/lib/warpzone/anglestransform.qh @@ -1,5 +1,4 @@ -#ifndef LIB_WARPZONE_ANGLETRANSFORM_H -#define LIB_WARPZONE_ANGLETRANSFORM_H +#pragma once #ifndef POSITIVE_PITCH_IS_DOWN #define POSITIVE_PITCH_IS_DOWN 1 @@ -42,4 +41,3 @@ vector AnglesTransform_ToVAngles(vector v); // transformed = original * transform + postshift vector AnglesTransform_Multiply_GetPostShift(vector sf0, vector st0, vector t1, vector st1); vector AnglesTransform_PrePostShift_GetPostShift(vector sf, vector t, vector st); -#endif diff --git a/qcsrc/lib/warpzone/client.qh b/qcsrc/lib/warpzone/client.qh index 8f3e643b5..47ff24136 100644 --- a/qcsrc/lib/warpzone/client.qh +++ b/qcsrc/lib/warpzone/client.qh @@ -1,5 +1,4 @@ -#ifndef LIB_WARPZONE_CLIENT_H -#define LIB_WARPZONE_CLIENT_H +#pragma once void WarpZone_FixPMove(); void WarpZone_FixView(); @@ -8,4 +7,3 @@ void WarpZone_Shutdown(); vector warpzone_save_view_origin; vector warpzone_save_view_angles; -#endif diff --git a/qcsrc/lib/warpzone/common.qh b/qcsrc/lib/warpzone/common.qh index 6669ae1af..4bbbb853b 100644 --- a/qcsrc/lib/warpzone/common.qh +++ b/qcsrc/lib/warpzone/common.qh @@ -1,5 +1,4 @@ -#ifndef LIB_WARPZONE_COMMON_H -#define LIB_WARPZONE_COMMON_H +#pragma once // uncomment this if your mod uses the roll angle in fixangle // #define KEEP_ROLL @@ -113,4 +112,3 @@ void WarpZoneLib_ExactTrigger_Init(entity this); // WARNING: this kills the trace globals #define EXACTTRIGGER_TOUCH(e,t) if(WarpZoneLib_ExactTrigger_Touch((e), (t))) return #define EXACTTRIGGER_INIT WarpZoneLib_ExactTrigger_Init(this) -#endif diff --git a/qcsrc/lib/warpzone/mathlib.qh b/qcsrc/lib/warpzone/mathlib.qh index c3de3838d..2b35c92f8 100644 --- a/qcsrc/lib/warpzone/mathlib.qh +++ b/qcsrc/lib/warpzone/mathlib.qh @@ -1,5 +1,4 @@ -#ifndef LIB_WARPZONE_MATHLIB_H -#define LIB_WARPZONE_MATHLIB_H +#pragma once // @@ -114,5 +113,3 @@ const float M_2_PI = 0.63661977236758134308; /* 2/pi */ const float M_2_SQRTPI = 1.12837916709551257390; /* 2/sqrt(pi) */ const float M_SQRT2 = 1.41421356237309504880; /* sqrt(2) */ const float M_SQRT1_2 = 0.70710678118654752440; /* 1/sqrt(2) */ - -#endif diff --git a/qcsrc/lib/warpzone/server.qh b/qcsrc/lib/warpzone/server.qh index 0ec67e4d3..b0c583d2d 100644 --- a/qcsrc/lib/warpzone/server.qh +++ b/qcsrc/lib/warpzone/server.qh @@ -1,5 +1,4 @@ -#ifndef LIB_WARPZONE_SERVER_H -#define LIB_WARPZONE_SERVER_H +#pragma once #ifdef SVQC void WarpZone_StartFrame(); @@ -17,5 +16,3 @@ void WarpZone_PlayerPhysics_FixVAngle(entity this); void WarpZone_PostInitialize_Callback(); #endif - -#endif diff --git a/qcsrc/lib/warpzone/util_server.qh b/qcsrc/lib/warpzone/util_server.qh index 39d1d2469..b73289927 100644 --- a/qcsrc/lib/warpzone/util_server.qh +++ b/qcsrc/lib/warpzone/util_server.qh @@ -1,9 +1,7 @@ -#ifndef LIB_WARPZONE_UTIL_SERVER_H -#define LIB_WARPZONE_UTIL_SERVER_H +#pragma once float WarpZoneLib_MoveOutOfSolid(entity e); float WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher); #ifdef SVQC void WarpZoneLib_ExactTrigger_Init(entity this); #endif -#endif -- 2.39.2