Skip to content

Commit

Permalink
Convert all include guards to pragma once
Browse files Browse the repository at this point in the history
Resolves #50
  • Loading branch information
SamVanheer committed Nov 18, 2021
1 parent fddcb4c commit 0a3c17b
Show file tree
Hide file tree
Showing 130 changed files with 134 additions and 704 deletions.
6 changes: 1 addition & 5 deletions cl_dll/ammo.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
*
****/

#ifndef __AMMO_H__
#define __AMMO_H__
#pragma once

#define MAX_WEAPON_NAME 128

Expand Down Expand Up @@ -57,6 +56,3 @@ struct WEAPON
};

typedef int AMMO;


#endif
5 changes: 1 addition & 4 deletions cl_dll/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
// Camera.h -- defines and such for a 3rd person camera
// NOTE: must include quakedef.h first

#ifndef _CAMERA_H_
#define _CAMERA_H_
#pragma once

// pitch, yaw, dist
extern Vector cam_ofs;
Expand All @@ -20,5 +19,3 @@ void CAM_Init();
void CAM_ClearStates();
void CAM_StartMouseMove();
void CAM_EndMouseMove();

#endif // _CAMERA_H_
1 change: 0 additions & 1 deletion cl_dll/cdll_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "hud.h"
#include "cl_util.h"
#include "netadr.h"
#undef INTERFACE_H
#include "../public/interface.h"
//#include "vgui_schememanager.h"

Expand Down
9 changes: 1 addition & 8 deletions cl_dll/global_consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
//
// $NoKeywords: $
//=============================================================================
#ifndef GLOBALCONSTS_H
#define GLOBALCONSTS_H
#ifdef _WIN32
#pragma once
#endif


#pragma once

enum
{
Expand All @@ -26,5 +21,3 @@ enum

#define MAX_SERVERNAME_LENGTH 64
#define MAX_TEAMNAME_SIZE 32

#endif // GLOBALCONSTS_H
4 changes: 0 additions & 4 deletions cl_dll/hud_spectator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// $NoKeywords: $
//=============================================================================

#ifndef SPECTATOR_H
#define SPECTATOR_H
#pragma once

#include "cl_entity.h"
Expand Down Expand Up @@ -152,5 +150,3 @@ class CHudSpectator : public CHudBase

cameraWayPoint_t m_CamPath[MAX_CAM_WAYPOINTS];
};

#endif // SPECTATOR_H
7 changes: 0 additions & 7 deletions cl_dll/interpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
**
******************************************************************************/

#ifndef INTERPOLATION_H
#define INTERPOLATION_H
#ifdef _WIN32
#pragma once
#endif


// interpolation class
class CInterpolation
Expand Down Expand Up @@ -52,5 +47,3 @@ class CInterpolation
bool m_SmoothStart;
bool m_SmoothEnd;
};

#endif // INTERPOLATION_H
10 changes: 1 addition & 9 deletions cl_dll/tri.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#ifndef TRI_H
#define TRI_H
#pragma once

#include "particleman.h"

extern IParticleMan *g_pParticleMan;






#endif //TRI_H
5 changes: 1 addition & 4 deletions cl_dll/vgui_ScorePanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// $NoKeywords: $
//=============================================================================

#ifndef SCOREPANEL_H
#define SCOREPANEL_H
#pragma once

#include<VGUI_Panel.h>
#include<VGUI_TablePanel.h>
Expand Down Expand Up @@ -306,5 +305,3 @@ class ScorePanel : public Panel, public vgui::CDefaultInputSignal

friend class CLabelHeader;
};

#endif
6 changes: 1 addition & 5 deletions cl_dll/vgui_SpectatorPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
//
//////////////////////////////////////////////////////////////////////

#ifndef SPECTATORPANEL_H
#define SPECTATORPANEL_H
#pragma once

#include <VGUI_Panel.h>
#include <VGUI_Label.h>
Expand Down Expand Up @@ -107,6 +106,3 @@ class CSpectatorHandler_Command : public ActionSignal
m_pFather->ActionSignal(m_cmd);
}
};


#endif // !defined SPECTATORPANEL_H
5 changes: 1 addition & 4 deletions cl_dll/vgui_TeamFortressViewport.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

#ifndef TEAMFORTRESSVIEWPORT_H
#define TEAMFORTRESSVIEWPORT_H
#pragma once

#include<VGUI_Panel.h>
#include<VGUI_Frame.h>
Expand Down Expand Up @@ -1807,5 +1806,3 @@ class CHealthPanel : public DragNDropPanel
FillRGBA(x, iYPos + 5, HealthWidth / 10, gHUD.m_iFontHeight, 255, 160, 0, a);
}
};

#endif
6 changes: 1 addition & 5 deletions cl_dll/vgui_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
// $NoKeywords: $
//=============================================================================

#ifndef VGUI_INT_H
#define VGUI_INT_H
#pragma once

void VGui_Startup();
void VGui_Shutdown();

//Only safe to call from inside subclass of Panel::paintBackground
void VGui_ViewportPaintBackground(int extents[4]);


#endif
6 changes: 0 additions & 6 deletions cl_dll/voice_status.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
// $NoKeywords: $
//=============================================================================

#ifndef VOICE_STATUS_H
#define VOICE_STATUS_H
#pragma once


#include "VGUI_Label.h"
#include "VGUI_LineBorder.h"
#include "VGUI_ImagePanel.h"
Expand Down Expand Up @@ -223,6 +220,3 @@ class CVoiceStatus : public CHudBase, public vgui::CDefaultInputSignal

// Get the (global) voice manager.
CVoiceStatus* GetClientVoiceMgr();


#endif // VOICE_STATUS_H
5 changes: 1 addition & 4 deletions common/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
*
****/

#ifndef PLATFORM_H
#define PLATFORM_H
#pragma once

/**
* @file
Expand Down Expand Up @@ -136,5 +135,3 @@ typedef int BOOL;
#define V_max(a,b) (((a) > (b)) ? (a) : (b))

#define clamp( val, min, max ) ( ((val) > (max)) ? (max) : ( ((val) < (min)) ? (min) : (val) ) )

#endif //PLATFORM_H
6 changes: 2 additions & 4 deletions common/Sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// S c r i p t e d S e q u e n c e s
//
//---------------------------------------------------------------------------
#ifndef _INCLUDE_SEQUENCE_H_
#define _INCLUDE_SEQUENCE_H_

#pragma once


#ifndef _DEF_BYTE_
Expand Down Expand Up @@ -197,5 +197,3 @@ sequenceEntry_s* SequenceGet( const char* fileName, const char* entryName );
void Sequence_ParseFile( const char* fileName, qboolean isGlobal );
void Sequence_OnLevelLoad( const char* mapName );
sentenceEntry_s* SequencePickSentence( const char *groupName, int pickMethod, int *picked );

#endif // _INCLUDE_SEQUENCE_H_
8 changes: 3 additions & 5 deletions common/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
* without written permission from Valve LLC.
*
****/
#ifndef CONST_H
#define CONST_H

#pragma once

//
// Constants shared by the engine and dlls
// This header file included by engine files and DLL files.
Expand Down Expand Up @@ -761,6 +762,3 @@ typedef struct
edict_t *ent; // entity the surface is on
int hitgroup; // 0 == generic, non zero is specific body part
} trace_t;

#endif

7 changes: 1 addition & 6 deletions common/crc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
*
****/
/* crc.h */
#ifndef CRC_H
#define CRC_H
#ifdef _WIN32

#pragma once
#endif

#include "archtypes.h" // DAL

Expand Down Expand Up @@ -55,5 +52,3 @@ char *MD5_Print(unsigned char hash[16]);
int MD5_Hash_CachedFile(unsigned char digest[16], unsigned char *pCache, int nFileSize, int bSeed, unsigned int seed[4]);

int CRC_MapFile(CRC32_t *crcvalue, char *pszFileName);

#endif
5 changes: 2 additions & 3 deletions common/cvardef.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* without written permission from Valve LLC.
*
****/
#ifndef CVARDEF_H
#define CVARDEF_H

#pragma once

#define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc
#define FCVAR_USERINFO (1<<1) // changes the client's info string
Expand All @@ -37,4 +37,3 @@ typedef struct cvar_s
float value;
struct cvar_s *next;
} cvar_t;
#endif
6 changes: 1 addition & 5 deletions common/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
*
****/

#ifndef ENUMS_H
#define ENUMS_H
#pragma once

typedef enum netsrc_s
{
NS_CLIENT,
NS_SERVER,
NS_MULTICAST // xxxMO
} netsrc_t;

#endif

5 changes: 1 addition & 4 deletions common/hltv.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// hltv.h
// all shared consts between server, clients and proxy

#ifndef HLTV_H
#define HLTV_H
#pragma once

#define TYPE_CLIENT 0 // client is a normal HL client (default)
#define TYPE_PROXY 1 // client is another proxy
Expand Down Expand Up @@ -50,5 +49,3 @@
#define DRC_FLAG_STARTPATH 1 // end with speed 0.0
#define DRC_FLAG_SLOWSTART 2 // start with speed 0.0
#define DRC_FLAG_SLOWEND 4 // end with speed 0.0

#endif // HLTV_H
7 changes: 1 addition & 6 deletions common/in_buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
* without written permission from Valve LLC.
*
****/
#ifndef IN_BUTTONS_H
#define IN_BUTTONS_H
#ifdef _WIN32

#pragma once
#endif

#define IN_ATTACK (1 << 0)
#define IN_JUMP (1 << 1)
Expand All @@ -34,5 +31,3 @@
#define IN_RELOAD (1 << 13)
#define IN_ALT1 (1 << 14)
#define IN_SCORE (1 << 15) // Used by client.dll for when scoreboard is held down

#endif // IN_BUTTONS_H
8 changes: 1 addition & 7 deletions common/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
// for legacy code). In this case, you need to make a new version name for your new interface, and make a wrapper interface and
// expose it for the old interface.

#ifndef INTERFACE_H
#define INTERFACE_H
#pragma once

// All interfaces derive from this.
class IBaseInterface
Expand Down Expand Up @@ -118,8 +117,3 @@ extern void Sys_FreeModule(HINTERFACEMODULE hModule);
// Use these to get the factory function from either a loaded module or the current module.
extern CreateInterfaceFn Sys_GetFactory( HINTERFACEMODULE hModule );
extern CreateInterfaceFn Sys_GetFactoryThis( void );

#endif



7 changes: 0 additions & 7 deletions common/ivoicetweak.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
// $NoKeywords: $
//=============================================================================

#ifndef IVOICETWEAK_H
#define IVOICETWEAK_H
#ifdef _WIN32
#pragma once
#endif

// These provide access to the voice controls.
typedef enum
Expand All @@ -33,6 +29,3 @@ typedef struct IVoiceTweak_s

int (*GetSpeakingVolume)();
} IVoiceTweak;


#endif // IVOICETWEAK_H
7 changes: 1 addition & 6 deletions common/netadr.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
*
****/
// netadr.h
#ifndef NETADR_H
#define NETADR_H
#ifdef _WIN32

#pragma once
#endif

typedef enum
{
Expand All @@ -36,5 +33,3 @@ typedef struct netadr_s
unsigned char ipx[10];
unsigned short port;
} netadr_t;

#endif // NETADR_H
Loading

0 comments on commit 0a3c17b

Please sign in to comment.