diff --git a/contrib/bobtoolz/CPortals.h b/contrib/bobtoolz/CPortals.h index 3633542b..eb86cd47 100644 --- a/contrib/bobtoolz/CPortals.h +++ b/contrib/bobtoolz/CPortals.h @@ -17,6 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#pragma once + class CBspPoint { public: float p[3]; diff --git a/contrib/bobtoolz/DBobView.h b/contrib/bobtoolz/DBobView.h index e2a94003..c8299233 100644 --- a/contrib/bobtoolz/DBobView.h +++ b/contrib/bobtoolz/DBobView.h @@ -21,8 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_BOBVIEW_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_BOBVIEW_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_ +#pragma once #include "ientity.h" #include "irender.h" @@ -35,10 +34,6 @@ class Shader; #define BOUNDS_ALL 0 #define BOUNDS_APEX 1 -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - class DBobView : public Renderable, public OpenGLRenderable, public Entity::Observer { Shader* m_shader_line; @@ -97,5 +92,3 @@ public: class Entity; void DBobView_setEntity( Entity& entity, float multiplier, int points, float varGravity, bool bNoUpdate, bool bShowExtra ); - -#endif // !defined(AFX_BOBVIEW_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_) diff --git a/contrib/bobtoolz/DBrush.h b/contrib/bobtoolz/DBrush.h index 5fb32848..ea71454d 100644 --- a/contrib/bobtoolz/DBrush.h +++ b/contrib/bobtoolz/DBrush.h @@ -21,12 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DBRUSH_H__35B2C522_F0A7_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_DBRUSH_H__35B2C522_F0A7_11D4_ACF7_004095A18133__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 #include #include @@ -111,5 +106,3 @@ public: }; //typedef CList DBrushList; - -#endif // !defined(AFX_DBRUSH_H__35B2C522_F0A7_11D4_ACF7_004095A18133__INCLUDED_) diff --git a/contrib/bobtoolz/DEPair.h b/contrib/bobtoolz/DEPair.h index cb027a09..712bceb9 100644 --- a/contrib/bobtoolz/DEPair.h +++ b/contrib/bobtoolz/DEPair.h @@ -21,12 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DEPAIR_H__35B2C521_F0A7_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_DEPAIR_H__35B2C521_F0A7_11D4_ACF7_004095A18133__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 #include "str.h" @@ -43,5 +38,3 @@ public: }; //typedef CList DEPairList; - -#endif // !defined(AFX_DEPAIR_H__35B2C521_F0A7_11D4_ACF7_004095A18133__INCLUDED_) diff --git a/contrib/bobtoolz/DEntity.h b/contrib/bobtoolz/DEntity.h index 78685df0..083bed74 100644 --- a/contrib/bobtoolz/DEntity.h +++ b/contrib/bobtoolz/DEntity.h @@ -21,12 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DENTITY_H__35B2C523_F0A7_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_DENTITY_H__35B2C523_F0A7_11D4_ACF7_004095A18133__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 #include #include "str.h" @@ -121,5 +116,3 @@ public: void SpawnFloat( const char* key, const char* defaultstring, float* out ); void SpawnVector( const char* key, const char* defaultstring, vec_t* out ); }; - -#endif // !defined(AFX_DENTITY_H__35B2C523_F0A7_11D4_ACF7_004095A18133__INCLUDED_) diff --git a/contrib/bobtoolz/DMap.h b/contrib/bobtoolz/DMap.h index 2f122c98..aadf8f8e 100644 --- a/contrib/bobtoolz/DMap.h +++ b/contrib/bobtoolz/DMap.h @@ -21,12 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DMAP_H__ACAE597A_D26D_49AD_AA69_EDE743DB54FA__INCLUDED_ ) -#define AFX_DMAP_H__ACAE597A_D26D_49AD_AA69_EDE743DB54FA__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 #include @@ -54,5 +49,3 @@ public: int FixBrushes(); }; - -#endif // !defined(AFX_DMAP_H__ACAE597A_D26D_49AD_AA69_EDE743DB54FA__INCLUDED_) diff --git a/contrib/bobtoolz/DPatch.h b/contrib/bobtoolz/DPatch.h index d26e53f9..43f3b7f8 100644 --- a/contrib/bobtoolz/DPatch.h +++ b/contrib/bobtoolz/DPatch.h @@ -21,8 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_ ) -#define AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_ +#pragma once #include #include @@ -77,5 +76,3 @@ public: virtual ~DPatch(); }; - -#endif // !defined(AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_) diff --git a/contrib/bobtoolz/DPlane.h b/contrib/bobtoolz/DPlane.h index bf0be941..4453591b 100644 --- a/contrib/bobtoolz/DPlane.h +++ b/contrib/bobtoolz/DPlane.h @@ -21,8 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DPLANE_H__FC37C021_F0A1_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_DPLANE_H__FC37C021_F0A1_11D4_ACF7_004095A18133__INCLUDED_ +#pragma once #include #include "ibrush.h" @@ -34,10 +33,6 @@ class DPoint; #define FACE_DETAIL 0x8000000 -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - class DWinding; class DPlane @@ -70,5 +65,4 @@ public: float _d; }; -//typedef CList DPlaneList; -#endif // !defined(AFX_DPLANE_H__FC37C021_F0A1_11D4_ACF7_004095A18133__INCLUDED_) +//typedef CList DPlaneList; \ No newline at end of file diff --git a/contrib/bobtoolz/DPoint.h b/contrib/bobtoolz/DPoint.h index 487c423a..b6f61497 100644 --- a/contrib/bobtoolz/DPoint.h +++ b/contrib/bobtoolz/DPoint.h @@ -21,12 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DPOINT_H__FC37C022_F0A1_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_DPOINT_H__FC37C022_F0A1_11D4_ACF7_004095A18133__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 #include "mathlib.h" @@ -43,5 +38,3 @@ public: }; //typedef CList DPointList; - -#endif // !defined(AFX_DPOINT_H__FC37C022_F0A1_11D4_ACF7_004095A18133__INCLUDED_) diff --git a/contrib/bobtoolz/DShape.h b/contrib/bobtoolz/DShape.h index 70c544d9..649c030a 100644 --- a/contrib/bobtoolz/DShape.h +++ b/contrib/bobtoolz/DShape.h @@ -21,12 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_ ) -#define AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 #include #include "mathlib.h" @@ -59,5 +54,3 @@ private: DMap m_Container; }; - -#endif // !defined(AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_) diff --git a/contrib/bobtoolz/DTrainDrawer.h b/contrib/bobtoolz/DTrainDrawer.h index 8db73adf..54ad75cf 100644 --- a/contrib/bobtoolz/DTrainDrawer.h +++ b/contrib/bobtoolz/DTrainDrawer.h @@ -21,13 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_TRAINDRAWER_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_TRAINDRAWER_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_ - -#if _MSC_VER > 1000 - #pragma once -#endif // _MSC_VER > 1000 #include #include "mathlib.h" @@ -84,5 +78,3 @@ public: splinePoint_t* AddSplinePoint( const char* name, const char* target, vec_t* origin ); controlPoint_t* FindControlPoint( const char* name ); }; - -#endif // !defined(AFX_TRAINDRAWER_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_) diff --git a/contrib/bobtoolz/DTreePlanter.h b/contrib/bobtoolz/DTreePlanter.h index 66c25884..18aa27f9 100644 --- a/contrib/bobtoolz/DTreePlanter.h +++ b/contrib/bobtoolz/DTreePlanter.h @@ -17,8 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __DTREE_H__ -#define __DTREE_H__ +#pragma once #include "qerplugin.h" #include "signal/isignal.h" @@ -224,5 +223,3 @@ private: bool m_setAngles; bool m_autoLink; }; - -#endif diff --git a/contrib/bobtoolz/DVisDrawer.h b/contrib/bobtoolz/DVisDrawer.h index f04653b4..d808476b 100644 --- a/contrib/bobtoolz/DVisDrawer.h +++ b/contrib/bobtoolz/DVisDrawer.h @@ -21,13 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_VISDRAWER_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_VISDRAWER_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_ - -#if _MSC_VER > 1000 - #pragma once -#endif // _MSC_VER > 1000 #include #include "renderable.h" @@ -78,5 +72,3 @@ public: void destroyShaders(); }; - -#endif // !defined(AFX_VISDRAWER_H__6E36062A_EF0B_11D4_ACF7_004095A18133__INCLUDED_) diff --git a/contrib/bobtoolz/DWinding.h b/contrib/bobtoolz/DWinding.h index d0214bb1..ada9b58a 100644 --- a/contrib/bobtoolz/DWinding.h +++ b/contrib/bobtoolz/DWinding.h @@ -21,12 +21,7 @@ // ////////////////////////////////////////////////////////////////////// -#if !defined( AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_ ) -#define AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 #include "mathlib.h" @@ -66,5 +61,3 @@ public: #define MAX_POINTS_ON_WINDING 64 #define ON_EPSILON 0.01 - -#endif // !defined(AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_) diff --git a/contrib/bobtoolz/ScriptParser.h b/contrib/bobtoolz/ScriptParser.h index 4c17eae9..687887b4 100644 --- a/contrib/bobtoolz/ScriptParser.h +++ b/contrib/bobtoolz/ScriptParser.h @@ -18,8 +18,7 @@ */ -#ifndef _SCRIPTPARSER_H_ -#define _SCRIPTPARSER_H_ +#pragma once //#include "interfaces/IScriptParser.h" @@ -57,5 +56,3 @@ public: void AddBreakChar( char c ); private: }; - -#endif diff --git a/contrib/bobtoolz/StdAfx.h b/contrib/bobtoolz/StdAfx.h index cfce5a4e..ac675364 100644 --- a/contrib/bobtoolz/StdAfx.h +++ b/contrib/bobtoolz/StdAfx.h @@ -17,9 +17,4 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __STDAFX_BOBTOOLZ__ -#define __STDAFX_BOBTOOLZ__ - - - -#endif +#pragma once diff --git a/contrib/bobtoolz/bobToolz-GTK.h b/contrib/bobtoolz/bobToolz-GTK.h index d10acc48..41b89e09 100644 --- a/contrib/bobtoolz/bobToolz-GTK.h +++ b/contrib/bobtoolz/bobToolz-GTK.h @@ -1,7 +1,4 @@ -#if !defined(INCLUDED_BOBTOOLZGTK_H) -#define INCLUDED_BOBTOOLZGTK_H +#pragma once extern GtkWidget *g_pRadiantWnd; - -#endif diff --git a/contrib/bobtoolz/bobToolz.h b/contrib/bobtoolz/bobToolz.h index ed8d59e6..ac898b02 100644 --- a/contrib/bobtoolz/bobToolz.h +++ b/contrib/bobtoolz/bobToolz.h @@ -20,12 +20,7 @@ // plugin.h : main header file for the PLUGIN DLL // -#if !defined( AFX_PLUGIN_H__3BA55F6A_1D27_11D3_BC7B_F7EFD9765E37__INCLUDED_ ) -#define AFX_PLUGIN_H__3BA55F6A_1D27_11D3_BC7B_F7EFD9765E37__INCLUDED_ - -#if _MSC_VER >= 1000 #pragma once -#endif // _MSC_VER >= 1000 #ifndef __AFXWIN_H__ #error include 'StdAfx.h' before including this file for PCH @@ -60,5 +55,3 @@ public: //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_PLUGIN_H__3BA55F6A_1D27_11D3_BC7B_F7EFD9765E37__INCLUDED_) diff --git a/contrib/bobtoolz/bsploader.h b/contrib/bobtoolz/bsploader.h index e88d97a6..70c90b01 100644 --- a/contrib/bobtoolz/bsploader.h +++ b/contrib/bobtoolz/bsploader.h @@ -1,4 +1,6 @@ +#pragma once + #include "mathlib.h" #define LUMP_ENTITIES 0 diff --git a/contrib/bobtoolz/funchandlers.h b/contrib/bobtoolz/funchandlers.h index b25cc6d8..34b7b402 100644 --- a/contrib/bobtoolz/funchandlers.h +++ b/contrib/bobtoolz/funchandlers.h @@ -17,6 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#pragma once + class DBobView; class DVisDrawer; class DTrainDrawer; diff --git a/contrib/bobtoolz/lists.h b/contrib/bobtoolz/lists.h index aa8e589f..62e8d846 100644 --- a/contrib/bobtoolz/lists.h +++ b/contrib/bobtoolz/lists.h @@ -17,6 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#pragma once + #include #include "str.h" typedef struct _GtkListStore GtkListStore; diff --git a/contrib/bobtoolz/misc.h b/contrib/bobtoolz/misc.h index 0b51176c..867fdcef 100644 --- a/contrib/bobtoolz/misc.h +++ b/contrib/bobtoolz/misc.h @@ -17,8 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#if !defined( INCLUDED_MISC_H ) -#define INCLUDED_MISC_H +#pragma once #include "mathlib.h" #include @@ -53,5 +52,3 @@ float Determinant3x3( float a1, float a2, float a3, bool GetEntityCentre( const char* entity, vec3_t centre ); void MakeNormal( const vec_t* va, const vec_t* vb, const vec_t* vc, vec_t* out ); - -#endif diff --git a/contrib/bobtoolz/shapes.h b/contrib/bobtoolz/shapes.h index c35809e7..73129c8e 100644 --- a/contrib/bobtoolz/shapes.h +++ b/contrib/bobtoolz/shapes.h @@ -17,6 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#pragma once + // TODO: implement all this stuff via DBrush class. started with DShape // TODO: Auto Face Scaling, no need to pass parms, calculated via brush. diff --git a/contrib/bobtoolz/visfind.h b/contrib/bobtoolz/visfind.h index 0929258c..d7de1c83 100644 --- a/contrib/bobtoolz/visfind.h +++ b/contrib/bobtoolz/visfind.h @@ -1,4 +1,6 @@ +#pragma once + #include #include "mathlib.h" diff --git a/contrib/brushexport/callbacks.h b/contrib/brushexport/callbacks.h index e954e31d..21eb6b06 100644 --- a/contrib/brushexport/callbacks.h +++ b/contrib/brushexport/callbacks.h @@ -1,3 +1,6 @@ + +#pragma once + typedef struct _GtkWidget GtkWidget; typedef struct _GtkButton GtkButton; diff --git a/contrib/brushexport/export.h b/contrib/brushexport/export.h index d2fd5310..137ebda2 100644 --- a/contrib/brushexport/export.h +++ b/contrib/brushexport/export.h @@ -1,5 +1,6 @@ -#ifndef EXPORT_H -#define EXPORT_H + +#pragma once + #include #include @@ -13,5 +14,3 @@ enum collapsemode typedef std::set StringSetWithLambda; bool ExportSelection( const StringSetWithLambda& ignorelist, collapsemode m, bool exmat, const std::string& path, bool limitMatNames, bool objects, bool weld ); - -#endif diff --git a/contrib/brushexport/plugin.h b/contrib/brushexport/plugin.h index a5e3f4c5..44b5367d 100644 --- a/contrib/brushexport/plugin.h +++ b/contrib/brushexport/plugin.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BRUSH_EXPORT_H ) -#define INCLUDED_BRUSH_EXPORT_H +#pragma once typedef struct _GtkWidget GtkWidget; extern GtkWidget *g_pRadiantWnd; - -#endif diff --git a/contrib/brushexport/support.h b/contrib/brushexport/support.h index bde944c9..50a33c7c 100644 --- a/contrib/brushexport/support.h +++ b/contrib/brushexport/support.h @@ -2,6 +2,8 @@ * DO NOT EDIT THIS FILE - it is generated by Glade. */ +#pragma once + #ifdef HAVE_CONFIG_H # include #endif diff --git a/contrib/hydratoolz/plugin.h b/contrib/hydratoolz/plugin.h index 9848fbfd..9a3cd3f9 100644 --- a/contrib/hydratoolz/plugin.h +++ b/contrib/hydratoolz/plugin.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _PLUGIN_H_ -#define _PLUGIN_H_ +#pragma once #include "mathlib.h" #include @@ -54,5 +53,3 @@ public: CSynapseClientHydraToolz() { } virtual ~CSynapseClientHydraToolz() { } }; - -#endif // _PLUGIN_H_ diff --git a/contrib/prtview/AboutDialog.h b/contrib/prtview/AboutDialog.h index b46fa93a..06298700 100644 --- a/contrib/prtview/AboutDialog.h +++ b/contrib/prtview/AboutDialog.h @@ -17,9 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#if !defined( INCLUDED_ABOUTDIALOG_H ) -#define INCLUDED_ABOUTDIALOG_H +#pragma once void DoAboutDlg(); - -#endif diff --git a/contrib/prtview/ConfigDialog.h b/contrib/prtview/ConfigDialog.h index a9725847..790d9a47 100644 --- a/contrib/prtview/ConfigDialog.h +++ b/contrib/prtview/ConfigDialog.h @@ -17,9 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#if !defined( INCLUDED_CONFIGDIALOG_H ) -#define INCLUDED_CONFIGDIALOG_H +#pragma once void DoConfigDialog(); - -#endif diff --git a/contrib/prtview/LoadPortalFileDialog.h b/contrib/prtview/LoadPortalFileDialog.h index 62dfc3d4..188ad4d0 100644 --- a/contrib/prtview/LoadPortalFileDialog.h +++ b/contrib/prtview/LoadPortalFileDialog.h @@ -17,9 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#if !defined( INCLUDED_LOADPORTALFILEDIALOG_H ) -#define INCLUDED_LOADPORTALFILEDIALOG_H +#pragma once int DoLoadPortalFileDialog(); - -#endif diff --git a/contrib/prtview/portals.h b/contrib/prtview/portals.h index 16518108..ae54fd1c 100644 --- a/contrib/prtview/portals.h +++ b/contrib/prtview/portals.h @@ -17,8 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _PORTALS_H_ -#define _PORTALS_H_ +#pragma once #include #include "irender.h" @@ -157,6 +156,3 @@ void Portals_constructShaders(); void Portals_destroyShaders(); void Portals_shadersChanged(); - - -#endif // _PORTALS_H_ diff --git a/contrib/prtview/prtview.h b/contrib/prtview/prtview.h index 3dd4e298..96255deb 100644 --- a/contrib/prtview/prtview.h +++ b/contrib/prtview/prtview.h @@ -17,8 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#if !defined( INCLUDED_PRTVIEW_H ) -#define INCLUDED_PRTVIEW_H +#pragma once #define MSG_PREFIX "Portal Viewer plugin: " @@ -33,6 +32,3 @@ extern GtkWidget *g_pRadiantWnd; #define IDOK 1 #define IDCANCEL 2 - - -#endif diff --git a/contrib/shaderplug/shaderplug.h b/contrib/shaderplug/shaderplug.h index d30c625d..aa33b8ed 100644 --- a/contrib/shaderplug/shaderplug.h +++ b/contrib/shaderplug/shaderplug.h @@ -19,9 +19,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SHADERPLUG_H ) -#define INCLUDED_SHADERPLUG_H +#pragma once #include "xml/xmltextags.h" - -#endif diff --git a/contrib/sunplug/sunplug.h b/contrib/sunplug/sunplug.h index 8ea4f50c..5c83a857 100644 --- a/contrib/sunplug/sunplug.h +++ b/contrib/sunplug/sunplug.h @@ -18,8 +18,4 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _PLUGIN_SUNPLUG_ - #define _PLUGIN_SUNPLUG_ - - -#endif // _PLUGIN_SUNPLUG_ +#pragma once diff --git a/contrib/ufoaiplug/ufoai.h b/contrib/ufoaiplug/ufoai.h index 38ad4ccf..32c4181b 100644 --- a/contrib/ufoaiplug/ufoai.h +++ b/contrib/ufoaiplug/ufoai.h @@ -16,7 +16,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_UFOAI_H ) -#define INCLUDED_UFOAI_H - -#endif +#pragma once diff --git a/contrib/ufoaiplug/ufoai_filters.h b/contrib/ufoaiplug/ufoai_filters.h index 840c45bc..72bba69a 100644 --- a/contrib/ufoaiplug/ufoai_filters.h +++ b/contrib/ufoaiplug/ufoai_filters.h @@ -16,8 +16,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_FILTERS_H ) -#define INCLUDED_FILTERS_H +#pragma once void filter_level( int flag ); void filter_stepon( void ); @@ -38,5 +37,3 @@ void filter_nodraw( void ); #define CONTENTS_ACTORCLIP 0x10000 #define CONTENTS_WEAPONCLIP 0x2000000 #define CONTENTS_STEPON 0x40000000 - -#endif diff --git a/contrib/ufoaiplug/ufoai_gtk.h b/contrib/ufoaiplug/ufoai_gtk.h index 0254f7d6..f29f69f9 100644 --- a/contrib/ufoaiplug/ufoai_gtk.h +++ b/contrib/ufoaiplug/ufoai_gtk.h @@ -16,8 +16,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_UFOAI_GTK_H ) -#define INCLUDED_UFOAI_GTK_H +#pragma once #include "itoolbar.h" #include @@ -26,5 +25,3 @@ const IToolbarButton* GetToolbarButton( std::size_t index ); const IToolbarButton* GetToolbarNoButton( std::size_t index ); std::size_t ToolbarButtonCount( void ); std::size_t ToolbarNoButtons( void ); - -#endif diff --git a/contrib/ufoaiplug/ufoai_level.h b/contrib/ufoaiplug/ufoai_level.h index 038908a2..e79a9d5b 100644 --- a/contrib/ufoaiplug/ufoai_level.h +++ b/contrib/ufoaiplug/ufoai_level.h @@ -16,11 +16,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_UFOAI_LEVEL_H ) -#define INCLUDED_UFOAI_LEVEL_H +#pragma once void assign_default_values_to_worldspawn( bool override, const char **returnMsg ); void check_map_values( const char **returnMsg ); void get_team_count( const char *classname, int *count, int *team ); - -#endif diff --git a/include/cullable.h b/include/cullable.h index 5a9d5682..6b77bba4 100644 --- a/include/cullable.h +++ b/include/cullable.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CULLABLE_H ) -#define INCLUDED_CULLABLE_H +#pragma once #include "generic/constant.h" @@ -71,6 +70,3 @@ public: virtual VolumeIntersectionValue intersectVolume( const VolumeTest& test, const Matrix4& localToWorld ) const = 0; }; - - -#endif diff --git a/include/editable.h b/include/editable.h index 68ab150a..71212b5d 100644 --- a/include/editable.h +++ b/include/editable.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_EDITABLE_H ) -#define INCLUDED_EDITABLE_H +#pragma once class Matrix4; @@ -49,5 +48,3 @@ public: inline Snappable* Node_getSnappable( scene::Node& node ){ return NodeTypeCast::cast( node ); } - -#endif diff --git a/include/iarchive.h b/include/iarchive.h index 118b6045..5c3cb4cf 100644 --- a/include/iarchive.h +++ b/include/iarchive.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IARCHIVE_H ) -#define INCLUDED_IARCHIVE_H +#pragma once #include #include "generic/constant.h" @@ -156,5 +155,3 @@ typedef Modules<_QERArchiveTable> ArchiveModules; template class ModulesRef; typedef ModulesRef<_QERArchiveTable> ArchiveModulesRef; - -#endif diff --git a/include/ibrush.h b/include/ibrush.h index d28c67e5..964939bb 100644 --- a/include/ibrush.h +++ b/include/ibrush.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IBRUSH_H ) -#define INCLUDED_IBRUSH_H +#pragma once #include "generic/constant.h" #include "generic/callback.h" @@ -137,5 +136,3 @@ typedef GlobalModuleRef GlobalBrushModuleRef; inline BrushCreator& GlobalBrushCreator(){ return GlobalBrushModule::getTable(); } - -#endif diff --git a/include/icamera.h b/include/icamera.h index 8a4bf9f9..1efc286c 100644 --- a/include/icamera.h +++ b/include/icamera.h @@ -25,8 +25,7 @@ // camera interface // -#if !defined( INCLUDED_ICAMERA_H ) -#define INCLUDED_ICAMERA_H +#pragma once #include "generic/constant.h" #include "generic/callbackfwd.h" @@ -63,5 +62,3 @@ struct _QERCameraTable PFN_SETCAMERA m_pfnSetCamera; PFN_GETCAMWINDOWEXTENTS m_pfnGetCamWindowExtents; }; - -#endif diff --git a/include/idatastream.h b/include/idatastream.h index bcce7e68..31ce94ec 100644 --- a/include/idatastream.h +++ b/include/idatastream.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IDATASTREAM_H ) -#define INCLUDED_IDATASTREAM_H +#pragma once #include @@ -79,5 +78,3 @@ class SeekableInputStream : public InputStream, public SeekableStream class SeekableOutputStream : public OutputStream, public SeekableStream { }; - -#endif diff --git a/include/ieclass.h b/include/ieclass.h index afab1de9..a58c3501 100644 --- a/include/ieclass.h +++ b/include/ieclass.h @@ -23,8 +23,7 @@ /// \brief Entity Class definition loader API. -#if !defined( INCLUDED_IECLASS_H ) -#define INCLUDED_IECLASS_H +#pragma once #include "generic/constant.h" @@ -112,5 +111,3 @@ typedef GlobalModuleRef GlobalEntityClassManagerModuleRef; inline EntityClassManager& GlobalEntityClassManager(){ return GlobalEntityClassManagerModule::getTable(); } - -#endif diff --git a/include/ientity.h b/include/ientity.h index deb3eae6..561e3204 100644 --- a/include/ientity.h +++ b/include/ientity.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IENTITY_H ) -#define INCLUDED_IENTITY_H +#pragma once #include "generic/constant.h" @@ -157,5 +156,3 @@ typedef GlobalModuleRef GlobalEntityModuleRef; inline EntityCreator& GlobalEntityCreator(){ return GlobalEntityModule::getTable(); } - -#endif diff --git a/include/ifilesystem.h b/include/ifilesystem.h index c29ced11..5ec621a5 100644 --- a/include/ifilesystem.h +++ b/include/ifilesystem.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IFILESYSTEM_H ) -#define INCLUDED_IFILESYSTEM_H +#pragma once #include #include "generic/constant.h" @@ -114,5 +113,3 @@ inline int vfsLoadFile( const char* filename, void** buffer, int index = 0 ){ inline void vfsFreeFile( void* p ){ GlobalFileSystem().freeFile( p ); } - -#endif diff --git a/include/ifiletypes.h b/include/ifiletypes.h index e903d3e7..34bbdde2 100644 --- a/include/ifiletypes.h +++ b/include/ifiletypes.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IFILETYPES_H ) -#define INCLUDED_IFILETYPES_H +#pragma once #include "generic/constant.h" @@ -70,7 +69,3 @@ typedef GlobalModuleRef GlobalFiletypesModuleRef; inline IFileTypeRegistry& GlobalFiletypes(){ return GlobalFiletypesModule::getTable(); } - - - -#endif diff --git a/include/ifilter.h b/include/ifilter.h index 2b088cb5..4fad9c4e 100644 --- a/include/ifilter.h +++ b/include/ifilter.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IFILTER_H ) -#define INCLUDED_IFILTER_H +#pragma once #include "generic/constant.h" @@ -86,5 +85,3 @@ typedef GlobalModuleRef GlobalFilterModuleRef; inline FilterSystem& GlobalFilterSystem(){ return GlobalFilterModule::getTable(); } - -#endif diff --git a/include/igl.h b/include/igl.h index 1595ee3c..e9526270 100644 --- a/include/igl.h +++ b/include/igl.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IGL_H ) -#define INCLUDED_IGL_H +#pragma once #include #include @@ -2945,6 +2944,3 @@ inline OpenGLBinding& GlobalOpenGL(){ #else #define GlobalOpenGL_debugAssertNoErrors() #endif - - -#endif diff --git a/include/iglrender.h b/include/iglrender.h index ac01bb93..f36a261a 100644 --- a/include/iglrender.h +++ b/include/iglrender.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IGLRENDER_H ) -#define INCLUDED_IGLRENDER_H +#pragma once #include "igl.h" #include "generic/vector.h" @@ -124,5 +123,3 @@ typedef GlobalModuleRef GlobalOpenGLStateLibraryModuleRef; inline OpenGLStateLibrary& GlobalOpenGLStateLibrary(){ return GlobalOpenGLStateLibraryModule::getTable(); } - -#endif diff --git a/include/igtkgl.h b/include/igtkgl.h index e6e85254..d8f32093 100644 --- a/include/igtkgl.h +++ b/include/igtkgl.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IGTKGL_H ) -#define INCLUDED_IGTKGL_H +#pragma once #include "generic/constant.h" @@ -39,5 +38,3 @@ struct _QERGtkGLTable void ( *glwidget_destroy_context )( GtkWidget* widget ); void ( *glwidget_create_context )( GtkWidget* widget ); }; - -#endif diff --git a/include/iimage.h b/include/iimage.h index a071756c..8b0cd63c 100644 --- a/include/iimage.h +++ b/include/iimage.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IIMAGE_H ) -#define INCLUDED_IIMAGE_H +#pragma once #include "generic/constant.h" @@ -68,5 +67,3 @@ typedef Modules<_QERPlugImageTable> ImageModules; template class ModulesRef; typedef ModulesRef<_QERPlugImageTable> ImageModulesRef; - -#endif // _IIMAGE_H diff --git a/include/imap.h b/include/imap.h index 6ed35e9b..9228954c 100644 --- a/include/imap.h +++ b/include/imap.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IMAP_H ) -#define INCLUDED_IMAP_H +#pragma once #include "generic/constant.h" @@ -76,6 +75,3 @@ typedef Modules MapModules; template class ModulesRef; typedef ModulesRef MapModulesRef; - - -#endif diff --git a/include/imodel.h b/include/imodel.h index 94690f62..11bec351 100644 --- a/include/imodel.h +++ b/include/imodel.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IMODEL_H ) -#define INCLUDED_IMODEL_H +#pragma once #include "generic/constant.h" @@ -46,5 +45,3 @@ typedef Modules ModelModules; template class ModulesRef; typedef ModulesRef ModelModulesRef; - -#endif /* _IMODEL_H_ */ diff --git a/include/ipatch.h b/include/ipatch.h index 01996d3f..1e9e5375 100644 --- a/include/ipatch.h +++ b/include/ipatch.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IPATCH_H ) -#define INCLUDED_IPATCH_H +#pragma once #include "generic/constant.h" #include "generic/vector.h" @@ -250,5 +249,3 @@ typedef GlobalModuleRef GlobalPatchModuleRef; inline PatchCreator& GlobalPatchCreator(){ return GlobalPatchModule::getTable(); } - -#endif diff --git a/include/iplugin.h b/include/iplugin.h index a67160be..196dac74 100644 --- a/include/iplugin.h +++ b/include/iplugin.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IPLUGIN_H ) -#define INCLUDED_IPLUGIN_H +#pragma once #include "generic/constant.h" @@ -49,5 +48,3 @@ typedef Modules<_QERPluginTable> PluginModules; template class ModulesRef; typedef ModulesRef<_QERPluginTable> PluginModulesRef; - -#endif diff --git a/include/ireference.h b/include/ireference.h index 602c4f3f..f48bfd94 100644 --- a/include/ireference.h +++ b/include/ireference.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IREFERENCE_H ) -#define INCLUDED_IREFERENCE_H +#pragma once #include "generic/constant.h" @@ -73,5 +72,3 @@ typedef GlobalModuleRef GlobalReferenceModuleRef; inline ReferenceCache& GlobalReferenceCache(){ return GlobalReferenceModule::getTable(); } - -#endif diff --git a/include/irender.h b/include/irender.h index 66738edd..d1a7428b 100644 --- a/include/irender.h +++ b/include/irender.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IRENDER_H ) -#define INCLUDED_IRENDER_H +#pragma once #include "generic/constant.h" #include "generic/callbackfwd.h" @@ -167,5 +166,3 @@ typedef GlobalModuleRef GlobalShaderCacheModuleRef; inline ShaderCache& GlobalShaderCache(){ return GlobalShaderCacheModule::getTable(); } - -#endif diff --git a/include/iscenegraph.h b/include/iscenegraph.h index 71cc8bf6..fb05c302 100644 --- a/include/iscenegraph.h +++ b/include/iscenegraph.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_ISCENEGRAPH_H ) -#define INCLUDED_ISCENEGRAPH_H +#pragma once #include #include "generic/constant.h" @@ -208,7 +207,3 @@ inline void AddSceneChangeCallback( const SignalHandler& handler ){ inline void SceneChangeNotify(){ GlobalSceneGraph().sceneChanged(); } - - - -#endif diff --git a/include/iscriplib.h b/include/iscriplib.h index 1992e7f1..f9c55b44 100644 --- a/include/iscriplib.h +++ b/include/iscriplib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ISCRIPLIB_H ) -#define INCLUDED_ISCRIPLIB_H +#pragma once /// \file iscriplib.h /// \brief Token input/output stream module. @@ -81,5 +80,3 @@ typedef GlobalModuleRef<_QERScripLibTable> GlobalScripLibModuleRef; inline _QERScripLibTable& GlobalScriptLibrary(){ return GlobalScripLibModule::getTable(); } - -#endif diff --git a/include/iselection.h b/include/iselection.h index e3aefcd7..09bb5ed6 100644 --- a/include/iselection.h +++ b/include/iselection.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ISELECTION_H ) -#define INCLUDED_ISELECTION_H +#pragma once #include #include "generic/constant.h" @@ -149,6 +148,3 @@ typedef GlobalModuleRef GlobalSelectionModuleRef; inline SelectionSystem& GlobalSelectionSystem(){ return GlobalSelectionModule::getTable(); } - - -#endif diff --git a/include/ishaders.h b/include/ishaders.h index 0d0e9ef1..e48ba4cf 100644 --- a/include/ishaders.h +++ b/include/ishaders.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ISHADERS_H ) -#define INCLUDED_ISHADERS_H +#pragma once #include "generic/constant.h" #include "generic/callbackfwd.h" @@ -183,5 +182,3 @@ inline ShaderSystem& GlobalShaderSystem(){ #define QERApp_ActiveShaders_IteratorAtEnd GlobalShaderSystem().endActiveShadersIterator #define QERApp_ActiveShaders_IteratorCurrent GlobalShaderSystem().dereferenceActiveShadersIterator #define QERApp_ActiveShaders_IteratorIncrement GlobalShaderSystem().incrementActiveShadersIterator - -#endif diff --git a/include/itexdef.h b/include/itexdef.h index 08ab4d9e..4297e821 100644 --- a/include/itexdef.h +++ b/include/itexdef.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_ITEXDEF_H ) -#define INCLUDED_ITEXDEF_H +#pragma once class texdef_t { @@ -37,5 +36,3 @@ public: scale[1] = 1; } }; - -#endif diff --git a/include/itextstream.h b/include/itextstream.h index a625e453..394fd437 100644 --- a/include/itextstream.h +++ b/include/itextstream.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ITEXTSTREAM_H ) -#define INCLUDED_ITEXTSTREAM_H +#pragma once /// \file /// \brief Text-stream interfaces. @@ -111,5 +110,3 @@ typedef Static GlobalErrorStream; inline TextOutputStream& globalErrorStream(){ return GlobalErrorStream::instance().getOutputStream(); } - -#endif diff --git a/include/itextures.h b/include/itextures.h index a07c6d49..f57dc2ec 100644 --- a/include/itextures.h +++ b/include/itextures.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ITEXTURES_H ) -#define INCLUDED_ITEXTURES_H +#pragma once #include "iimage.h" #include "generic/constant.h" @@ -83,5 +82,3 @@ typedef GlobalModuleRef GlobalTexturesModuleRef; inline TexturesCache& GlobalTexturesCache(){ return GlobalTexturesModule::getTable(); } - -#endif diff --git a/include/itoolbar.h b/include/itoolbar.h index a83f5524..576dde1f 100644 --- a/include/itoolbar.h +++ b/include/itoolbar.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IPLUGTOOLBAR_H ) -#define INCLUDED_IPLUGTOOLBAR_H +#pragma once #include #include "generic/constant.h" @@ -62,5 +61,3 @@ typedef Modules<_QERPlugToolbarTable> ToolbarModules; template class ModulesRef; typedef ModulesRef<_QERPlugToolbarTable> ToolbarModulesRef; - -#endif diff --git a/include/iundo.h b/include/iundo.h index c13a6242..050bb241 100644 --- a/include/iundo.h +++ b/include/iundo.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IUNDO_H ) -#define INCLUDED_IUNDO_H +#pragma once /// \file /// \brief The undo-system interface. Uses the 'memento' pattern. @@ -113,6 +112,3 @@ public: GlobalUndoSystem().finish( m_command ); } }; - - -#endif diff --git a/include/mapfile.h b/include/mapfile.h index cdb4eae5..d20a957e 100644 --- a/include/mapfile.h +++ b/include/mapfile.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MAPFILE_H ) -#define INCLUDED_MAPFILE_H +#pragma once #include @@ -66,7 +65,3 @@ inline MapFile* path_find_mapfile( Iterator first, Iterator last ){ ERROR_MESSAGE( "failed to find parent mapfile for path" ); return 0; } - - - -#endif diff --git a/include/modelskin.h b/include/modelskin.h index ac2f486d..68ab79d0 100644 --- a/include/modelskin.h +++ b/include/modelskin.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODELSKIN_H ) -#define INCLUDED_MODELSKIN_H +#pragma once #include "generic/constant.h" #include "generic/callbackfwd.h" @@ -86,5 +85,3 @@ typedef GlobalModuleRef GlobalModelSkinCacheModuleRef; inline ModelSkinCache& GlobalModelSkinCache(){ return GlobalModelSkinCacheModule::getTable(); } - -#endif diff --git a/include/moduleobserver.h b/include/moduleobserver.h index 1ded4202..8205c96a 100644 --- a/include/moduleobserver.h +++ b/include/moduleobserver.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODULEOBSERVER_H ) -#define INCLUDED_MODULEOBSERVER_H +#pragma once class ModuleObserver { @@ -28,5 +27,3 @@ public: virtual void unrealise() = 0; virtual void realise() = 0; }; - -#endif diff --git a/include/modulesystem.h b/include/modulesystem.h index 873c4663..f7390f60 100644 --- a/include/modulesystem.h +++ b/include/modulesystem.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODULESYSTEM_H ) -#define INCLUDED_MODULESYSTEM_H +#pragma once #include "generic/static.h" #include "debugging/debugging.h" @@ -233,5 +232,3 @@ public: return GlobalModule::getTable(); } }; - -#endif diff --git a/include/nameable.h b/include/nameable.h index 04145d79..856352a2 100644 --- a/include/nameable.h +++ b/include/nameable.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_NAMEABLE_H ) -#define INCLUDED_NAMEABLE_H +#pragma once #include "generic/constant.h" #include "generic/callbackfwd.h" @@ -36,6 +35,3 @@ public: virtual void attach( const NameCallback& callback ) = 0; virtual void detach( const NameCallback& callback ) = 0; }; - - -#endif diff --git a/include/namespace.h b/include/namespace.h index bcb76e14..1301d63f 100644 --- a/include/namespace.h +++ b/include/namespace.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_NAMESPACE_H ) -#define INCLUDED_NAMESPACE_H +#pragma once #include "generic/constant.h" #include "generic/callbackfwd.h" @@ -59,4 +58,3 @@ typedef GlobalModuleRef GlobalNamespaceModuleRef; inline Namespace& GlobalNamespace(){ return GlobalNamespaceModule::getTable(); } -#endif diff --git a/include/preferencesystem.h b/include/preferencesystem.h index ad5c6884..64b2ccb9 100644 --- a/include/preferencesystem.h +++ b/include/preferencesystem.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PREFERENCESYSTEM_H ) -#define INCLUDED_PREFERENCESYSTEM_H +#pragma once #include "generic/constant.h" #include "generic/callbackfwd.h" @@ -50,6 +49,3 @@ typedef GlobalModuleRef GlobalPreferenceSystemModuleRef; inline PreferenceSystem& GlobalPreferenceSystem(){ return GlobalPreferenceSystemModule::getTable(); } - - -#endif diff --git a/include/qerplugin.h b/include/qerplugin.h index eb242ccc..c8975ada 100644 --- a/include/qerplugin.h +++ b/include/qerplugin.h @@ -23,8 +23,7 @@ // // -#ifndef __QERPLUGIN_H__ -#define __QERPLUGIN_H__ +#pragma once #include "generic/constant.h" @@ -179,5 +178,3 @@ typedef GlobalModuleRef<_QERFuncTable_1> GlobalRadiantModuleRef; inline _QERFuncTable_1& GlobalRadiant(){ return GlobalRadiantModule::getTable(); } - -#endif diff --git a/include/renderable.h b/include/renderable.h index a0adacc8..90de398c 100644 --- a/include/renderable.h +++ b/include/renderable.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_RENDERABLE_H ) -#define INCLUDED_RENDERABLE_H +#pragma once #include "generic/constant.h" @@ -71,5 +70,3 @@ public: virtual void viewChanged() const { } }; - -#endif diff --git a/include/selectable.h b/include/selectable.h index 16716f98..211d14ec 100644 --- a/include/selectable.h +++ b/include/selectable.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SELECTABLE_H ) -#define INCLUDED_SELECTABLE_H +#pragma once #include @@ -305,7 +304,3 @@ public: virtual void selectByPlane( const Plane3& plane ) = 0; virtual void gatherPolygonsByPlane( const Plane3& plane, std::vector>& polygons ) const = 0; }; - - - -#endif diff --git a/include/warnings.h b/include/warnings.h index e067fd11..4aea4cd7 100644 --- a/include/warnings.h +++ b/include/warnings.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_WARNINGS_H ) -#define INCLUDED_WARNINGS_H +#pragma once #if _MSC_VER > 1000 && defined( WIN32 ) #pragma warning(disable:4355) // 'this' : used in base member initializer list #pragma warning(disable:4503) // '[symbol]' : decorated name length exceeded, name was truncated #endif - -#endif diff --git a/include/windowobserver.h b/include/windowobserver.h index 19381eb4..49021d1d 100644 --- a/include/windowobserver.h +++ b/include/windowobserver.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_WINDOWOBSERVER_H ) -#define INCLUDED_WINDOWOBSERVER_H +#pragma once template class BitFieldValue; struct ModifierEnumeration; @@ -87,5 +86,3 @@ public: virtual void onModifierDown( ModifierFlags modifier ) = 0; virtual void onModifierUp( ModifierFlags modifier ) = 0; }; - -#endif diff --git a/libs/archivelib.h b/libs/archivelib.h index a56afa66..46d0d0ae 100644 --- a/libs/archivelib.h +++ b/libs/archivelib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_ARCHIVELIB_H ) -#define INCLUDED_ARCHIVELIB_H +#pragma once #include "debugging/debugging.h" #include "iarchive.h" @@ -219,6 +218,3 @@ public: return m_inputStream; } }; - - -#endif diff --git a/libs/bytebool.h b/libs/bytebool.h index 3214ab9a..7aa7ea79 100644 --- a/libs/bytebool.h +++ b/libs/bytebool.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __BYTEBOOL__ -#define __BYTEBOOL__ +#pragma once // defines boolean and byte types usable in both c and c++ code // this header is not really meant for direct inclusion, @@ -31,5 +30,3 @@ typedef bool qboolean; //typedef enum { qfalse, qtrue } qboolean; typedef unsigned char byte; - -#endif diff --git a/libs/bytestreamutils.h b/libs/bytestreamutils.h index 90a9048a..6c0a7aca 100644 --- a/libs/bytestreamutils.h +++ b/libs/bytestreamutils.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BYTESTREAMUTILS_H ) -#define INCLUDED_BYTESTREAMUTILS_H +#pragma once #if defined( __GNUC__ ) @@ -151,5 +150,3 @@ inline typename InputStreamType::byte_type istream_read_byte( InputStreamType& i istream.read( &b, sizeof( typename InputStreamType::byte_type ) ); return b; } - -#endif diff --git a/libs/character.h b/libs/character.h index bc35d3ff..5ea3caa5 100644 --- a/libs/character.h +++ b/libs/character.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CHARACTER_H ) -#define INCLUDED_CHARACTER_H +#pragma once /// \file /// \brief Character encoding. @@ -40,5 +39,3 @@ inline bool string_is_ascii( const char* string ){ } return true; } - -#endif diff --git a/libs/cmdlib.h b/libs/cmdlib.h index 843dee76..09634a32 100644 --- a/libs/cmdlib.h +++ b/libs/cmdlib.h @@ -23,8 +23,7 @@ // start of shared cmdlib stuff // -#ifndef __CMDLIB__ -#define __CMDLIB__ +#pragma once #include @@ -94,7 +93,3 @@ inline bool Q_mkdir( const char* name ){ inline double Sys_DoubleTime( void ){ return clock() / 1000.0; } - - - -#endif diff --git a/libs/container/array.h b/libs/container/array.h index 71ae6d02..a1135146 100644 --- a/libs/container/array.h +++ b/libs/container/array.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONTAINER_ARRAY_H ) -#define INCLUDED_CONTAINER_ARRAY_H +#pragma once #include #include @@ -166,5 +165,3 @@ inline void swap( Array& self, Array& ot self.swap( other ); } } - -#endif diff --git a/libs/container/cache.h b/libs/container/cache.h index ddf99622..12dd8bb2 100644 --- a/libs/container/cache.h +++ b/libs/container/cache.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONTAINER_CACHE_H ) -#define INCLUDED_CONTAINER_CACHE_H +#pragma once #include #include "container/hashtable.h" @@ -173,6 +172,3 @@ public: m_map.clear(); } }; - - -#endif diff --git a/libs/container/container.h b/libs/container/container.h index b7a2ea39..0f35638c 100644 --- a/libs/container/container.h +++ b/libs/container/container.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONTAINER_CONTAINER_H ) -#define INCLUDED_CONTAINER_CONTAINER_H +#pragma once #include #include @@ -366,6 +365,3 @@ public: } } }; - - -#endif diff --git a/libs/container/hashfunc.h b/libs/container/hashfunc.h index c717623f..d1b9c51d 100644 --- a/libs/container/hashfunc.h +++ b/libs/container/hashfunc.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONTAINER_HASHFUNC_H ) -#define INCLUDED_CONTAINER_HASHFUNC_H +#pragma once #include #include "string/string.h" @@ -398,7 +397,3 @@ struct HashKeyHasher return key.hash(); } }; - - - -#endif diff --git a/libs/container/hashtable.h b/libs/container/hashtable.h index cdab5f2c..3954c100 100644 --- a/libs/container/hashtable.h +++ b/libs/container/hashtable.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONTAINER_HASHTABLE_H ) -#define INCLUDED_CONTAINER_HASHTABLE_H +#pragma once #include #include @@ -406,5 +405,3 @@ public: tmp.swap( *this ); } }; - -#endif diff --git a/libs/container/stack.h b/libs/container/stack.h index d33d7b99..de814223 100644 --- a/libs/container/stack.h +++ b/libs/container/stack.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONTAINER_STACK_H ) -#define INCLUDED_CONTAINER_STACK_H +#pragma once #include "memory/allocator.h" #include @@ -207,5 +206,3 @@ inline void swap( Stack& self, Stack& other ){ self.swap( other ); } } - -#endif diff --git a/libs/convert.h b/libs/convert.h index ca763806..a02da643 100644 --- a/libs/convert.h +++ b/libs/convert.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONVERT_H ) -#define INCLUDED_CONVERT_H +#pragma once /// \file /// \brief Character encoding conversion. @@ -261,6 +260,3 @@ inline TextOutputStreamType& ostream_write( TextOutputStreamType& ostream, const } return ostream; } - - -#endif diff --git a/libs/ddslib.h b/libs/ddslib.h index 0d2182fa..37fae303 100644 --- a/libs/ddslib.h +++ b/libs/ddslib.h @@ -36,11 +36,7 @@ ----------------------------------------------------------------------------- */ - -/* marker */ -#ifndef DDSLIB_H -#define DDSLIB_H - +#pragma once /* dependencies */ @@ -245,6 +241,3 @@ int DDSDecompress( ddsBuffer_t *dds, unsigned char *pixels ) #ifdef __cplusplus } #endif - -/* end marker */ -#endif diff --git a/libs/debugging/debugging.h b/libs/debugging/debugging.h index bf553f74..27cf6299 100644 --- a/libs/debugging/debugging.h +++ b/libs/debugging/debugging.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_DEBUGGING_DEBUGGING_H ) -#define INCLUDED_DEBUGGING_DEBUGGING_H +#pragma once /// \file /// \brief Debugging macros for fatal error/assert messages. @@ -125,5 +124,3 @@ inline DebugMessageHandler& globalDebugMessageHandler(){ #define ASSERT_NOTNULL( ptr ) #endif - -#endif diff --git a/libs/dragplanes.h b/libs/dragplanes.h index efd78f4c..bff7005a 100644 --- a/libs/dragplanes.h +++ b/libs/dragplanes.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_DRAGPLANES_H ) -#define INCLUDED_DRAGPLANES_H +#pragma once #include "selectable.h" #include "cullable.h" @@ -380,5 +379,3 @@ public: return tra[0] * len; } }; - -#endif diff --git a/libs/eclasslib.h b/libs/eclasslib.h index 481f17fe..8ff4148b 100644 --- a/libs/eclasslib.h +++ b/libs/eclasslib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_ECLASSLIB_H ) -#define INCLUDED_ECLASSLIB_H +#pragma once #include #include @@ -339,5 +338,3 @@ inline EntityClass *EntityClass_Create_Default( const char *name, bool has_brush return EClass_Create_FixedSize( name, Vector3( 0.0f, 0.5f, 0.0f ), smallbox[0], smallbox[1], "Not found in source." ); } } - -#endif diff --git a/libs/entitylib.h b/libs/entitylib.h index f0fbed3e..15b33c4f 100644 --- a/libs/entitylib.h +++ b/libs/entitylib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_ENTITYLIB_H ) -#define INCLUDED_ENTITYLIB_H +#pragma once #include "ireference.h" #include "debugging/debugging.h" @@ -709,5 +708,3 @@ inline bool aabb_fits_view( const AABB& aabb, const Matrix4& modelview, const Ma //return ( aabb.extents[0] / viewport[0] ) > 0.25f || ( aabb.extents[1] / viewport[5] ) > 0.25f; return ( viewport[0] + viewport[5] ) / ( transformed_bounds.extents[0] + transformed_bounds.extents[1] ) < ratio; } - -#endif diff --git a/libs/entityxml.h b/libs/entityxml.h index 923f6eaa..c3b2b96f 100644 --- a/libs/entityxml.h +++ b/libs/entityxml.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ENTITYXML_H ) -#define INCLUDED_ENTITYXML_H +#pragma once #include "ientity.h" #include "xml/ixml.h" @@ -92,7 +91,3 @@ public: entity_copy( entity.getEntity(), other.getEntity() ); } }; - - - -#endif diff --git a/libs/etclib.h b/libs/etclib.h index 5ca9a99a..9c71af3d 100644 --- a/libs/etclib.h +++ b/libs/etclib.h @@ -14,8 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef INCLUDED_ETCLIB_H -#define INCLUDED_ETCLIB_H +#pragma once #include "bytebool.h" @@ -29,5 +28,3 @@ void ETC_DecodeETC1Block( const byte* in, byte* out, bool outRGBA ); #ifdef __cplusplus } #endif - -#endif diff --git a/libs/filematch.h b/libs/filematch.h index cdb340a8..c06b7a9d 100644 --- a/libs/filematch.h +++ b/libs/filematch.h @@ -1,5 +1,4 @@ -#if !defined( INCLUDED_FILEMATCH_H ) -#define INCLUDED_FILEMATCH_H +#pragma once #ifdef __cplusplus extern "C" @@ -12,5 +11,3 @@ int matchpattern_with_separator( const char *in, const char *pattern, int casein #ifdef __cplusplus } #endif - -#endif diff --git a/libs/fs_filesystem.h b/libs/fs_filesystem.h index d80a42f1..4125069c 100644 --- a/libs/fs_filesystem.h +++ b/libs/fs_filesystem.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_FS_FILESYSTEM_H ) -#define INCLUDED_FS_FILESYSTEM_H +#pragma once #include "string/string.h" #include "os/path.h" @@ -156,5 +155,3 @@ public: } } }; - -#endif diff --git a/libs/fs_path.h b/libs/fs_path.h index 23e1aaef..1b271778 100644 --- a/libs/fs_path.h +++ b/libs/fs_path.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_FS_PATH_H ) -#define INCLUDED_FS_PATH_H +#pragma once #include "stream/stringstream.h" @@ -78,5 +77,3 @@ public: } } }; - -#endif diff --git a/libs/generic/arrayrange.h b/libs/generic/arrayrange.h index e036cf3d..6fdea6ec 100644 --- a/libs/generic/arrayrange.h +++ b/libs/generic/arrayrange.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_ARRAYRANGE_H ) -#define INCLUDED_GENERIC_ARRAYRANGE_H +#pragma once /// \file /// \brief Macros for automatically converting a compile-time-sized array to a range. @@ -66,5 +65,3 @@ typedef ArrayConstRange StringArrayRange; #define STRING_ARRAY_RANGE( array ) ( StringArrayRange( array, ARRAY_END( array ) ) ) typedef ArrayRange StringRange; - -#endif diff --git a/libs/generic/bitfield.h b/libs/generic/bitfield.h index e713d44b..f1dbc164 100644 --- a/libs/generic/bitfield.h +++ b/libs/generic/bitfield.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_BITFIELD_H ) -#define INCLUDED_GENERIC_BITFIELD_H +#pragma once /// \file /// \brief Type safe bitfield. @@ -111,5 +110,3 @@ template inline bool bitfield_enabled( BitFieldValue bitfield, BitFieldValue mask ){ return ( bitfield & mask ).get() != 0; } - -#endif diff --git a/libs/generic/callback.h b/libs/generic/callback.h index f5a8e717..1b50634d 100644 --- a/libs/generic/callback.h +++ b/libs/generic/callback.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_CLOSURE_H ) -#define INCLUDED_GENERIC_CLOSURE_H +#pragma once /// \file /// \brief Type-safe techniques for binding the first argument of an opaque callback. @@ -668,6 +667,3 @@ typedef Callback1 StringExportCallback; typedef Callback1 SizeImportCallback; typedef Callback1 SizeExportCallback; - - -#endif diff --git a/libs/generic/callbackfwd.h b/libs/generic/callbackfwd.h index 48c01d39..89ddb2d4 100644 --- a/libs/generic/callbackfwd.h +++ b/libs/generic/callbackfwd.h @@ -1,6 +1,5 @@ -#if !defined( INCLUDED_CALLBACKFWD_H ) -#define INCLUDED_CALLBACKFWD_H +#pragma once template class Callback0; @@ -14,5 +13,3 @@ class Callback2; template class Callback3; - -#endif diff --git a/libs/generic/constant.h b/libs/generic/constant.h index b0532b92..02899516 100644 --- a/libs/generic/constant.h +++ b/libs/generic/constant.h @@ -19,13 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_CONSTANT_H ) -#define INCLUDED_GENERIC_CONSTANT_H +#pragma once /// \file /// \brief Language extensions for constants that are guaranteed to be evaluated at compile-time. #define STRING_CONSTANT( name, value ) static constexpr const char* name = value #define INTEGER_CONSTANT( name, value ) static constexpr int name = value - -#endif diff --git a/libs/generic/enumeration.h b/libs/generic/enumeration.h index d78e7d21..17b4646d 100644 --- a/libs/generic/enumeration.h +++ b/libs/generic/enumeration.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_ENUMERATION_H ) -#define INCLUDED_GENERIC_ENUMERATION_H +#pragma once /// \file /// \brief Type safe enumeration. @@ -52,5 +51,3 @@ template inline bool operator!=( EnumeratedValue self, EnumeratedValue other ){ return !operator==( self, other ); } - -#endif diff --git a/libs/generic/functional.h b/libs/generic/functional.h index 993d7ed4..735b54f5 100644 --- a/libs/generic/functional.h +++ b/libs/generic/functional.h @@ -1,6 +1,5 @@ -#if !defined( INCLUDED_FUNCTIONAL_H ) -#define INCLUDED_FUNCTIONAL_H +#pragma once template class Member @@ -314,6 +313,3 @@ class TypeEqual public: typedef True type; }; - - -#endif diff --git a/libs/generic/object.h b/libs/generic/object.h index 5677a0e3..ef20498c 100644 --- a/libs/generic/object.h +++ b/libs/generic/object.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_OBJECT_H ) -#define INCLUDED_GENERIC_OBJECT_H +#pragma once /// \file /// \brief Convenience functions (syntactic sugar) to wrap explicit constructor (aka in-place 'new') and destructor calls. @@ -82,7 +81,3 @@ template inline void destructor( Type& object ){ object.~Type(); } - - - -#endif diff --git a/libs/generic/reference.h b/libs/generic/reference.h index a6b2a95d..cb5898fb 100644 --- a/libs/generic/reference.h +++ b/libs/generic/reference.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_REFERENCE_H ) -#define INCLUDED_GENERIC_REFERENCE_H +#pragma once /// \file /// \brief Wrappers to allow storing objects in templated containers using 'reference' semantics. @@ -98,6 +97,3 @@ template inline ConstReference makeReference( const Type& value ){ return ConstReference( value ); } - - -#endif diff --git a/libs/generic/referencecounted.h b/libs/generic/referencecounted.h index 6033ab53..50d58b28 100644 --- a/libs/generic/referencecounted.h +++ b/libs/generic/referencecounted.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_REFERENCECOUNTED_H ) -#define INCLUDED_GENERIC_REFERENCECOUNTED_H +#pragma once /// \file /// \brief 'smart' pointers and references. @@ -176,5 +175,3 @@ inline void swap( SmartReference& self, SmartReference& other ){ self.swap( other ); } } - -#endif diff --git a/libs/generic/static.h b/libs/generic/static.h index 2106064c..c5a6c01d 100644 --- a/libs/generic/static.h +++ b/libs/generic/static.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_STATIC_H ) -#define INCLUDED_GENERIC_STATIC_H +#pragma once /// \file /// \brief Template techniques for instantiating singletons. @@ -135,6 +134,3 @@ public: return CountedStatic::instance(); } }; - - -#endif diff --git a/libs/generic/vector.h b/libs/generic/vector.h index 9818587a..54fc7c99 100644 --- a/libs/generic/vector.h +++ b/libs/generic/vector.h @@ -1,6 +1,5 @@ -#if !defined( INCLUDED_VECTOR_H ) -#define INCLUDED_VECTOR_H +#pragma once #include @@ -258,6 +257,3 @@ template TextOutputStreamType& ostream_write( TextOutputStreamType& t, const Vector4& v ){ return t << "[ " << v.x() << ' ' << v.y() << ' ' << v.z() << ' ' << v.w() << " ]"; } - - -#endif diff --git a/libs/gtkutil/accelerator.h b/libs/gtkutil/accelerator.h index cf6fe8b2..aec581d1 100644 --- a/libs/gtkutil/accelerator.h +++ b/libs/gtkutil/accelerator.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_ACCELERATOR_H ) -#define INCLUDED_GTKUTIL_ACCELERATOR_H +#pragma once #include #include @@ -142,5 +141,3 @@ typedef struct _GtkWidget GtkWidget; void PressedButtons_connect( PressedButtons& pressedButtons, GtkWidget* widget ); extern PressedButtons g_pressedButtons; - -#endif diff --git a/libs/gtkutil/button.h b/libs/gtkutil/button.h index 33d211b3..5da39198 100644 --- a/libs/gtkutil/button.h +++ b/libs/gtkutil/button.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_BUTTON_H ) -#define INCLUDED_GTKUTIL_BUTTON_H +#pragma once #include "generic/callbackfwd.h" @@ -45,5 +44,3 @@ void toggle_button_set_active_no_signal( GtkToggleToolButton* item, gboolean act void radio_button_set_active( GtkRadioButton* radio, int index ); void radio_button_set_active_no_signal( GtkRadioButton* radio, int index ); int radio_button_get_active( GtkRadioButton* radio ); - -#endif diff --git a/libs/gtkutil/clipboard.h b/libs/gtkutil/clipboard.h index 69b64d70..40e65c5e 100644 --- a/libs/gtkutil/clipboard.h +++ b/libs/gtkutil/clipboard.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_CLIPBOARD_H ) -#define INCLUDED_GTKUTIL_CLIPBOARD_H +#pragma once class TextOutputStream; typedef void ( *ClipboardCopyFunc )( TextOutputStream& ); @@ -29,5 +28,3 @@ void clipboard_copy( ClipboardCopyFunc copy ); class TextInputStream; typedef void ( *ClipboardPasteFunc )( TextInputStream& ); void clipboard_paste( ClipboardPasteFunc paste ); - -#endif diff --git a/libs/gtkutil/closure.h b/libs/gtkutil/closure.h index 9696464a..ca2a3278 100644 --- a/libs/gtkutil/closure.h +++ b/libs/gtkutil/closure.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_CLOSURE_H ) -#define INCLUDED_GTKUTIL_CLOSURE_H +#pragma once #include #include "generic/callback.h" @@ -66,5 +65,3 @@ inline void object_set_boolean_property( GObject* object, const char* property, g_value_set_boolean( &gvalue, value ); g_object_set_property( object, property, &gvalue ); } - -#endif diff --git a/libs/gtkutil/container.h b/libs/gtkutil/container.h index e633d81c..c8be8e87 100644 --- a/libs/gtkutil/container.h +++ b/libs/gtkutil/container.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_CONTAINER_H ) -#define INCLUDED_GTKUTIL_CONTAINER_H +#pragma once #include @@ -36,5 +35,3 @@ inline void container_remove( GtkWidget* item, gpointer data ){ inline void container_remove_all( GtkContainer* container ){ gtk_container_foreach( container, container_remove, container ); } - -#endif diff --git a/libs/gtkutil/cursor.h b/libs/gtkutil/cursor.h index 70b92af6..0376f0fb 100644 --- a/libs/gtkutil/cursor.h +++ b/libs/gtkutil/cursor.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_CURSOR_H ) -#define INCLUDED_GTKUTIL_CURSOR_H +#pragma once #include #include @@ -268,6 +267,3 @@ public: self->value_changed( gtk_adjustment_get_value( adjustment ) ); } }; - - -#endif diff --git a/libs/gtkutil/dialog.h b/libs/gtkutil/dialog.h index e7e72e4e..d93e1e92 100644 --- a/libs/gtkutil/dialog.h +++ b/libs/gtkutil/dialog.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_DIALOG_H ) -#define INCLUDED_GTKUTIL_DIALOG_H +#pragma once #include "generic/callback.h" #include "generic/arrayrange.h" @@ -113,6 +112,3 @@ public: GtkLabel* DialogLabel_new( const char* name ); GtkTable* DialogRow_new( const char* name, GtkWidget* widget ); void DialogVBox_packRow( GtkVBox* vbox, GtkWidget* row ); - - -#endif diff --git a/libs/gtkutil/entry.h b/libs/gtkutil/entry.h index 66beace1..48b9292b 100644 --- a/libs/gtkutil/entry.h +++ b/libs/gtkutil/entry.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_ENTRY_H ) -#define INCLUDED_GTKUTIL_ENTRY_H +#pragma once #include #include @@ -53,5 +52,3 @@ inline int entry_get_int( GtkEntry* entry ){ inline double entry_get_float( GtkEntry* entry ){ return atof( entry_get_string( entry ) ); } - -#endif diff --git a/libs/gtkutil/filechooser.h b/libs/gtkutil/filechooser.h index 49140460..9c0bc9c8 100644 --- a/libs/gtkutil/filechooser.h +++ b/libs/gtkutil/filechooser.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_FILECHOOSER_H ) -#define INCLUDED_GTKUTIL_FILECHOOSER_H +#pragma once /// \file /// GTK+ file-chooser dialogs. @@ -34,5 +33,3 @@ const char* file_dialog( GtkWidget *parent, bool open, const char* title, const /// The directory will initially default to \p path, which must be an absolute path. /// The returned string is allocated with \c g_malloc and must be freed with \c g_free. char* dir_dialog( GtkWidget *parent, const char* title = "Choose Directory", const char* path = "" ); - -#endif diff --git a/libs/gtkutil/frame.h b/libs/gtkutil/frame.h index ebeccc28..1970875b 100644 --- a/libs/gtkutil/frame.h +++ b/libs/gtkutil/frame.h @@ -19,11 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_FRAME_H ) -#define INCLUDED_GTKUTIL_FRAME_H +#pragma once typedef struct _GtkWidget GtkWidget; typedef struct _GtkFrame GtkFrame; GtkFrame* create_framed_widget( GtkWidget* widget ); - -#endif diff --git a/libs/gtkutil/glfont.h b/libs/gtkutil/glfont.h index 6b99076d..e53cebfd 100644 --- a/libs/gtkutil/glfont.h +++ b/libs/gtkutil/glfont.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_GLFONT_H ) -#define INCLUDED_GTKUTIL_GLFONT_H +#pragma once typedef unsigned int GLuint; @@ -38,5 +37,3 @@ public: GLFont *glfont_create( const char* font_string ); // release with delete - -#endif diff --git a/libs/gtkutil/glwidget.h b/libs/gtkutil/glwidget.h index bf343590..41f17923 100644 --- a/libs/gtkutil/glwidget.h +++ b/libs/gtkutil/glwidget.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_GLWIDGET_H ) -#define INCLUDED_GTKUTIL_GLWIDGET_H +#pragma once typedef struct _GtkWidget GtkWidget; typedef int gint; @@ -34,6 +33,3 @@ void glwidget_create_context( GtkWidget* widget ); extern void ( *GLWidget_sharedContextCreated )(); extern void ( *GLWidget_sharedContextDestroyed )(); - - -#endif diff --git a/libs/gtkutil/idledraw.h b/libs/gtkutil/idledraw.h index f6e75870..e3c79681 100644 --- a/libs/gtkutil/idledraw.h +++ b/libs/gtkutil/idledraw.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_IDLEDRAW_H ) -#define INCLUDED_GTKUTIL_IDLEDRAW_H +#pragma once #include @@ -56,6 +55,3 @@ public: } } }; - - -#endif diff --git a/libs/gtkutil/image.h b/libs/gtkutil/image.h index cf452559..2da5319d 100644 --- a/libs/gtkutil/image.h +++ b/libs/gtkutil/image.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_IMAGE_H ) -#define INCLUDED_GTKUTIL_IMAGE_H +#pragma once void BitmapsPath_set( const char* path ); @@ -32,5 +31,3 @@ GtkImage* image_new_from_file_with_mask( const char* filename ); GtkImage* image_new_missing(); GtkImage* new_image( const char* filename ); // filename is full path to image file GtkImage* new_local_image( const char* filename ); // filename is relative to local bitmaps path - -#endif diff --git a/libs/gtkutil/menu.h b/libs/gtkutil/menu.h index a64291d4..9ee0e2b2 100644 --- a/libs/gtkutil/menu.h +++ b/libs/gtkutil/menu.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_MENU_H ) -#define INCLUDED_GTKUTIL_MENU_H +#pragma once #include "generic/callbackfwd.h" @@ -54,5 +53,3 @@ typedef struct _GtkCheckMenuItem GtkCheckMenuItem; void check_menu_item_set_active_no_signal( GtkCheckMenuItem* item, gboolean active ); typedef struct _GtkRadioMenuItem GtkRadioMenuItem; void radio_menu_item_set_active_no_signal( GtkRadioMenuItem* item, gboolean active ); - -#endif diff --git a/libs/gtkutil/messagebox.h b/libs/gtkutil/messagebox.h index 8bdc0ba2..5b48d154 100644 --- a/libs/gtkutil/messagebox.h +++ b/libs/gtkutil/messagebox.h @@ -19,13 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_MESSAGEBOX_H ) -#define INCLUDED_GTKUTIL_MESSAGEBOX_H +#pragma once #include "qerplugin.h" typedef struct _GtkWidget GtkWidget; /// \brief Shows a modal message-box. EMessageBoxReturn gtk_MessageBox( GtkWidget *parent, const char* text, const char* title = "NetRadiant", EMessageBoxType type = eMB_OK, EMessageBoxIcon icon = eMB_ICONDEFAULT ); - -#endif diff --git a/libs/gtkutil/nonmodal.h b/libs/gtkutil/nonmodal.h index 41985ca8..471a8176 100644 --- a/libs/gtkutil/nonmodal.h +++ b/libs/gtkutil/nonmodal.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_NONMODAL_H ) -#define INCLUDED_GTKUTIL_NONMODAL_H +#pragma once #include #include @@ -155,6 +154,3 @@ public: } } }; - - -#endif diff --git a/libs/gtkutil/paned.h b/libs/gtkutil/paned.h index 323a58aa..c0e6ad44 100644 --- a/libs/gtkutil/paned.h +++ b/libs/gtkutil/paned.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_PANED_H ) -#define INCLUDED_GTKUTIL_PANED_H +#pragma once typedef struct _GtkWidget GtkWidget; GtkWidget* create_split_views( GtkWidget* topleft, GtkWidget* botleft, GtkWidget* topright, GtkWidget* botright, GtkWidget*& vsplit1, GtkWidget*& vsplit2 ); - -#endif diff --git a/libs/gtkutil/pointer.h b/libs/gtkutil/pointer.h index 035ab8e3..b22f9abd 100644 --- a/libs/gtkutil/pointer.h +++ b/libs/gtkutil/pointer.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_POINTER_H ) -#define INCLUDED_GTKUTIL_POINTER_H +#pragma once typedef int gint; typedef void* gpointer; @@ -34,5 +33,3 @@ inline gint gpointer_to_int( gpointer p ){ inline gpointer gint_to_pointer( gint i ){ return gpointer( std::size_t( i ) ); } - -#endif diff --git a/libs/gtkutil/toolbar.h b/libs/gtkutil/toolbar.h index 484d2964..847879ff 100644 --- a/libs/gtkutil/toolbar.h +++ b/libs/gtkutil/toolbar.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_TOOLBAR_H ) -#define INCLUDED_GTKUTIL_TOOLBAR_H +#pragma once #include "generic/callbackfwd.h" @@ -38,5 +37,3 @@ GtkToolButton* toolbar_append_button( GtkToolbar* toolbar, const char* descripti GtkToolButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Command& command ); GtkToggleToolButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback ); GtkToggleToolButton* toolbar_append_toggle_button( GtkToolbar* toolbar, const char* description, const char* icon, const Toggle& toggle ); - -#endif diff --git a/libs/gtkutil/widget.h b/libs/gtkutil/widget.h index b1fb880c..cf77ea29 100644 --- a/libs/gtkutil/widget.h +++ b/libs/gtkutil/widget.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_WIDGET_H ) -#define INCLUDED_GTKUTIL_WIDGET_H +#pragma once #include #include @@ -194,5 +193,3 @@ public: g_signal_connect( G_OBJECT( widget ), "focus_out_event", G_CALLBACK( focus_out ), this ); } }; - -#endif diff --git a/libs/gtkutil/window.h b/libs/gtkutil/window.h index eccffe09..d2ee6f14 100644 --- a/libs/gtkutil/window.h +++ b/libs/gtkutil/window.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GTKUTIL_WINDOW_H ) -#define INCLUDED_GTKUTIL_WINDOW_H +#pragma once #include @@ -176,7 +175,3 @@ inline void WindowPositionTracker_exportString( const WindowPositionTracker& sel WindowPosition_Write( self.getPosition(), importer ); } typedef ConstReferenceCaller1 WindowPositionTrackerExportStringCaller; - - - -#endif diff --git a/libs/gtkutil/xorrectangle.h b/libs/gtkutil/xorrectangle.h index e95cebd6..59595cab 100644 --- a/libs/gtkutil/xorrectangle.h +++ b/libs/gtkutil/xorrectangle.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_XORRECTANGLE_H ) -#define INCLUDED_XORRECTANGLE_H +#pragma once #include "rect_t.h" #include "igl.h" @@ -101,6 +100,3 @@ public: } } }; - - -#endif diff --git a/libs/imagelib.h b/libs/imagelib.h index c5550bf9..ba65ade3 100644 --- a/libs/imagelib.h +++ b/libs/imagelib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IMAGELIB_H ) -#define INCLUDED_IMAGELIB_H +#pragma once #include "iimage.h" #include "iarchive.h" @@ -131,5 +130,3 @@ public: return m_read; } }; - -#endif diff --git a/libs/instancelib.h b/libs/instancelib.h index e4b3bbfe..a4f7ee30 100644 --- a/libs/instancelib.h +++ b/libs/instancelib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_INSTANCELIB_H ) -#define INCLUDED_INSTANCELIB_H +#pragma once #include "debugging/debugging.h" @@ -171,5 +170,3 @@ public: } typedef ReferenceCaller::apply> Caller; }; - -#endif diff --git a/libs/l_net/l_net.h b/libs/l_net/l_net.h index 8782f27c..e6de65c1 100644 --- a/libs/l_net/l_net.h +++ b/libs/l_net/l_net.h @@ -29,6 +29,8 @@ // Notes: //==================================================================== +#pragma once + //++timo FIXME: the l_net code understands that as the max size for the netmessage_s structure // we have defined unsigned char data[MAX_NETMESSAGE] in netmessage_s but actually it cannot be filled completely // we need to introduce a new #define and adapt to data[MAX_NETBUFFER] diff --git a/libs/l_net/l_net_wins.h b/libs/l_net/l_net_wins.h index f3efb88c..3d3e612a 100644 --- a/libs/l_net/l_net_wins.h +++ b/libs/l_net/l_net_wins.h @@ -28,6 +28,9 @@ // Tab Size: 3 // Notes: //=========================================================================== + +#pragma once + #include "bytebool.h" int WINS_Init( void ); void WINS_Shutdown( void ); diff --git a/libs/maplib.h b/libs/maplib.h index 4c411128..288f89e0 100644 --- a/libs/maplib.h +++ b/libs/maplib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_MAPLIB_H ) -#define INCLUDED_MAPLIB_H +#pragma once #include "nameable.h" #include "mapfile.h" @@ -233,6 +232,3 @@ inline void MapRoot_destroy(){ inline NodeSmartReference NewMapRoot( const char* name ){ return NodeSmartReference( ( new MapRoot( name ) )->node() ); } - - -#endif diff --git a/libs/math/aabb.h b/libs/math/aabb.h index 49fdbfb3..fcfe380e 100644 --- a/libs/math/aabb.h +++ b/libs/math/aabb.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_AABB_H ) -#define INCLUDED_MATH_AABB_H +#pragma once /// \file /// \brief Axis-aligned bounding-box data types and related operations. @@ -287,5 +286,3 @@ inline AABB aabb_for_oriented_aabb_safe( const AABB& aabb, const Matrix4& transf inline AABB aabb_infinite(){ return AABB( Vector3( 0, 0, 0 ), Vector3( c_aabb_max, c_aabb_max, c_aabb_max ) ); } - -#endif diff --git a/libs/math/curve.h b/libs/math/curve.h index 8d2d7cbc..831165a6 100644 --- a/libs/math/curve.h +++ b/libs/math/curve.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_CURVE_H ) -#define INCLUDED_MATH_CURVE_H +#pragma once /// \file /// \brief Curve data types and related operations. @@ -170,5 +169,3 @@ inline void KnotVector_openUniform( Knots& knots, std::size_t count, std::size_t knots[i + equalKnots] = Knots::value_type( double(i + 1) * 1.0 / double(difference + 1) ); } } - -#endif diff --git a/libs/math/expression.h b/libs/math/expression.h index 18b9c5db..ef49e949 100644 --- a/libs/math/expression.h +++ b/libs/math/expression.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_EXPRESSION_H ) -#define INCLUDED_EXPRESSION_H +#pragma once #include @@ -555,5 +554,3 @@ template inline MatrixTransposed matrix_transposed( const First& first ){ return MatrixTransposed( first ); } - -#endif diff --git a/libs/math/frustum.h b/libs/math/frustum.h index d0b6e541..57db6280 100644 --- a/libs/math/frustum.h +++ b/libs/math/frustum.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_FRUSTUM_H ) -#define INCLUDED_MATH_FRUSTUM_H +#pragma once /// \file /// \brief View-frustum data types and related operations. @@ -650,5 +649,3 @@ inline Vector4 viewer_from_viewproj( const Matrix4& viewproj ){ } return viewer; } - -#endif diff --git a/libs/math/line.h b/libs/math/line.h index 6a4ebb7f..2afaa26d 100644 --- a/libs/math/line.h +++ b/libs/math/line.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_LINE_H ) -#define INCLUDED_MATH_LINE_H +#pragma once /// \file /// \brief Line data types and related operations. @@ -177,5 +176,3 @@ inline DoubleRay plane3_intersect_plane3( const Plane3& plane, const Plane3& oth return line; } - -#endif diff --git a/libs/math/matrix.h b/libs/math/matrix.h index b9e098ed..c34950e8 100644 --- a/libs/math/matrix.h +++ b/libs/math/matrix.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_MATRIX_H ) -#define INCLUDED_MATH_MATRIX_H +#pragma once /// \file /// \brief Matrix data types and related operations. @@ -1169,5 +1168,3 @@ template inline TextOutputStreamType& ostream_write( TextOutputStreamType& ostream, const Matrix4& m ){ return ostream << m.x() << ' ' << m.y() << ' ' << m.z() << ' ' << m.t(); } - -#endif diff --git a/libs/math/pi.h b/libs/math/pi.h index dde3f48b..f55d4305 100644 --- a/libs/math/pi.h +++ b/libs/math/pi.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_PI_H ) -#define INCLUDED_MATH_PI_H +#pragma once /// \file /// \brief Pi constants and degrees/radians conversion. @@ -39,5 +38,3 @@ inline double radians_to_degrees( double radians ){ inline double degrees_to_radians( double degrees ){ return degrees * c_DEG2RADMULT; } - -#endif diff --git a/libs/math/plane.h b/libs/math/plane.h index 54c7a12b..221455f9 100644 --- a/libs/math/plane.h +++ b/libs/math/plane.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_PLANE_H ) -#define INCLUDED_MATH_PLANE_H +#pragma once /// \file /// \brief Plane data types and related operations. @@ -174,5 +173,3 @@ template inline BasicVector3 plane3_project_point( const Plane3___

& plane, const BasicVector3& point ){ return point - plane.normal() * plane3_distance_to_point( plane, point ); } - -#endif diff --git a/libs/math/quaternion.h b/libs/math/quaternion.h index 19196fd8..6a25c278 100644 --- a/libs/math/quaternion.h +++ b/libs/math/quaternion.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_QUATERNION_H ) -#define INCLUDED_MATH_QUATERNION_H +#pragma once /// \file /// \brief Quaternion data types and related operations. @@ -300,6 +299,3 @@ inline void matrix4_pivoted_rotate_by_axisangle( Matrix4& self, const Vector3& a matrix4_rotate_by_axisangle( self, axis, angle ); matrix4_translate_by_vec3( self, vector3_negated( pivotpoint ) ); } - - -#endif diff --git a/libs/math/vector.h b/libs/math/vector.h index 91cadb0d..ab424897 100644 --- a/libs/math/vector.h +++ b/libs/math/vector.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MATH_VECTOR_H ) -#define INCLUDED_MATH_VECTOR_H +#pragma once /// \file /// \brief Vector data types and related operations. @@ -746,5 +745,3 @@ template inline BasicVector3 vector4_projected( const BasicVector4& self ){ return vector3_scaled( vector4_to_vector3( self ), 1.0 / self[3] ); } - -#endif diff --git a/libs/mathlib.h b/libs/mathlib.h index 1301d43a..a8307b98 100644 --- a/libs/mathlib.h +++ b/libs/mathlib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __MATHLIB__ -#define __MATHLIB__ +#pragma once // mathlib.h #include @@ -495,5 +494,3 @@ vec_accu_t VectorNormalizeAccu( const vec3_accu_t in, vec3_accu_t out ); #ifdef __cplusplus } #endif - -#endif /* __MATHLIB__ */ diff --git a/libs/md5lib.h b/libs/md5lib.h index db9fd333..825a7eaa 100644 --- a/libs/md5lib.h +++ b/libs/md5lib.h @@ -47,8 +47,7 @@ 1999-05-03 lpd Original version. */ -#ifndef md5_INCLUDED -# define md5_INCLUDED +#pragma once /* * This package supports both compile-time and run-time determination of CPU @@ -87,5 +86,3 @@ void md5_finish( md5_state_t * pms, md5_byte_t digest[16] ); #ifdef __cplusplus } /* end extern "C" */ #endif - -#endif /* md5_INCLUDED */ diff --git a/libs/memory/allocator.h b/libs/memory/allocator.h index ce82b279..99d89658 100644 --- a/libs/memory/allocator.h +++ b/libs/memory/allocator.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MEMORY_ALLOCATOR_H ) -#define INCLUDED_MEMORY_ALLOCATOR_H +#pragma once #include #include @@ -287,5 +286,3 @@ class NamedDelete public: typedef Delete > type; }; - -#endif diff --git a/libs/moduleobservers.h b/libs/moduleobservers.h index fbf8082d..43aa5b2f 100644 --- a/libs/moduleobservers.h +++ b/libs/moduleobservers.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODULEOBSERVERS_H ) -#define INCLUDED_MODULEOBSERVERS_H +#pragma once #include "debugging/debugging.h" #include @@ -55,5 +54,3 @@ public: } } }; - -#endif diff --git a/libs/modulesystem/moduleregistry.h b/libs/modulesystem/moduleregistry.h index 7cd84f97..f594395e 100644 --- a/libs/modulesystem/moduleregistry.h +++ b/libs/modulesystem/moduleregistry.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODULESYSTEM_MODULEREGISTRY_H ) -#define INCLUDED_MODULESYSTEM_MODULEREGISTRY_H +#pragma once #include "generic/static.h" #include @@ -57,6 +56,3 @@ public: StaticModuleRegistryList::instance().addModule( module ); } }; - - -#endif diff --git a/libs/modulesystem/modulesmap.h b/libs/modulesystem/modulesmap.h index 77197785..dd0243cc 100644 --- a/libs/modulesystem/modulesmap.h +++ b/libs/modulesystem/modulesmap.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODULESYSTEM_MODULESMAP_H ) -#define INCLUDED_MODULESYSTEM_MODULESMAP_H +#pragma once #include "modulesystem.h" #include "string/string.h" @@ -134,5 +133,3 @@ public: return m_modules; } }; - -#endif diff --git a/libs/modulesystem/singletonmodule.h b/libs/modulesystem/singletonmodule.h index bbefb0f6..ce3a2dc2 100644 --- a/libs/modulesystem/singletonmodule.h +++ b/libs/modulesystem/singletonmodule.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODULESYSTEM_SINGLETONMODULE_H ) -#define INCLUDED_MODULESYSTEM_SINGLETONMODULE_H +#pragma once #include "modulesystem.h" #include @@ -126,6 +125,3 @@ public: } } }; - - -#endif diff --git a/libs/os/dir.h b/libs/os/dir.h index b1992848..3d5c774f 100644 --- a/libs/os/dir.h +++ b/libs/os/dir.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_OS_DIR_H ) -#define INCLUDED_OS_DIR_H +#pragma once /// \file /// \brief OS directory-listing object. @@ -63,6 +62,3 @@ void Directory_forEach( const char* path, const Functor& functor ){ directory_close( dir ); } } - - -#endif diff --git a/libs/os/file.h b/libs/os/file.h index 41c20c15..4d6d3f51 100644 --- a/libs/os/file.h +++ b/libs/os/file.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_OS_FILE_H ) -#define INCLUDED_OS_FILE_H +#pragma once /// \file /// \brief OS file-system querying and manipulation. @@ -144,7 +143,3 @@ inline FileTime file_modified( const char* path ){ } return st.st_mtime; } - - - -#endif diff --git a/libs/os/path.h b/libs/os/path.h index 6a8852da..089f8f1d 100644 --- a/libs/os/path.h +++ b/libs/os/path.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_OS_PATH_H ) -#define INCLUDED_OS_PATH_H +#pragma once /// \file /// \brief OS file-system path comparison, decomposition and manipulation. @@ -310,6 +309,3 @@ TextOutputStreamType& ostream_write( TextOutputStreamType& ostream, const PathDe } return ostream; } - - -#endif diff --git a/libs/picomodel.h b/libs/picomodel.h index f06ddda6..e9382a83 100644 --- a/libs/picomodel.h +++ b/libs/picomodel.h @@ -34,9 +34,7 @@ -/* marker */ -#ifndef PICOMODEL_H -#define PICOMODEL_H +#pragma once #ifdef __cplusplus extern "C" @@ -346,6 +344,3 @@ void PicoAddTriangleToModel( picoModel_t *model, picoVec3_t** xyz, picoVec3_t** #ifdef __cplusplus } #endif - -/* end marker */ -#endif diff --git a/libs/picomodel/picointernal.h b/libs/picomodel/picointernal.h index f7cf9655..a918651f 100644 --- a/libs/picomodel/picointernal.h +++ b/libs/picomodel/picointernal.h @@ -33,10 +33,8 @@ ----------------------------------------------------------------------------- */ +#pragma once -/* marker */ -#ifndef PICOINTERNAL_H -#define PICOINTERNAL_H #ifdef __cplusplus extern "C" @@ -204,6 +202,3 @@ long _pico_memstream_tell( picoMemStream_t *s ); #ifdef __cplusplus } #endif - -/* end marker */ -#endif diff --git a/libs/picomodel/pm_fm.h b/libs/picomodel/pm_fm.h index 6fa317ca..ca660303 100644 --- a/libs/picomodel/pm_fm.h +++ b/libs/picomodel/pm_fm.h @@ -41,8 +41,7 @@ serotonin@earthlink.net */ -#ifndef __PM_FM_H__ -#define __PM_FM_H__ +#pragma once #include "picointernal.h" @@ -363,5 +362,3 @@ float fm_normals[FM_NUMVERTEXNORMALS][3] = { {-0.587785f, -0.425325f, -0.688191f}, {-0.688191f, -0.587785f, -0.425325f}, }; - -#endif diff --git a/libs/pivot.h b/libs/pivot.h index 711a0672..50f6f060 100644 --- a/libs/pivot.h +++ b/libs/pivot.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PIVOT_H ) -#define INCLUDED_PIVOT_H +#pragma once #include "math/matrix.h" @@ -278,7 +277,3 @@ public: renderer.PopState(); } }; - - - -#endif diff --git a/libs/profile/file.h b/libs/profile/file.h index d1e9dcdb..495aa690 100644 --- a/libs/profile/file.h +++ b/libs/profile/file.h @@ -32,8 +32,7 @@ // file.h //////////////////////////////////////////////////// -#if !defined( INCLUDED_PROFILE_FILE_H ) -#define INCLUDED_PROFILE_FILE_H +#pragma once #include "idatastream.h" @@ -170,5 +169,3 @@ public: void Close(); bool Open( const char *filename, const char *mode ); }; - -#endif diff --git a/libs/profile/profile.h b/libs/profile/profile.h index 493743f6..789771e3 100644 --- a/libs/profile/profile.h +++ b/libs/profile/profile.h @@ -28,8 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined( INCLUDED_PROFILE_PROFILE_H ) -#define INCLUDED_PROFILE_PROFILE_H +#pragma once // profile functions - kind of utility lib // they are kind of dumb, they expect to get the path to the .ini file or to the prefs directory when called @@ -45,5 +44,3 @@ char* profile_load_string( const char *filename, const char *section, const char // used in the command map code bool read_var( const char *filename, const char *section, const char *key, char *value ); bool save_var( const char *filename, const char *section, const char *key, const char *value ); - -#endif diff --git a/libs/rect_t.h b/libs/rect_t.h index 297b0a81..9113641e 100644 --- a/libs/rect_t.h +++ b/libs/rect_t.h @@ -1,5 +1,4 @@ -#if !defined( INCLUDED_RECT_T_H ) -#define INCLUDED_RECT_T_H +#pragma once struct rect_t { float min[2]; @@ -17,6 +16,3 @@ struct rect_t { modifier = eSelect; } }; - - -#endif diff --git a/libs/render.h b/libs/render.h index 2303461c..78fcc24a 100644 --- a/libs/render.h +++ b/libs/render.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_RENDER_H ) -#define INCLUDED_RENDER_H +#pragma once /// \file /// \brief High-level constructs for efficient OpenGL rendering. @@ -1555,6 +1554,3 @@ protected: } private: }; - - -#endif diff --git a/libs/scenelib.h b/libs/scenelib.h index f204244b..b0f6a3db 100644 --- a/libs/scenelib.h +++ b/libs/scenelib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_SCENELIB_H ) -#define INCLUDED_SCENELIB_H +#pragma once #include "iscenegraph.h" #include "iselection.h" @@ -968,6 +967,3 @@ typedef ConstReference PathConstReference; #include "generic/referencecounted.h" typedef SmartReference > NodeSmartReference; - - -#endif diff --git a/libs/script/scripttokeniser.h b/libs/script/scripttokeniser.h index ae59c3ed..08276918 100644 --- a/libs/script/scripttokeniser.h +++ b/libs/script/scripttokeniser.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SCRIPT_SCRIPTTOKENISER_H ) -#define INCLUDED_SCRIPT_SCRIPTTOKENISER_H +#pragma once #include "iscriplib.h" @@ -354,5 +353,3 @@ inline Tokeniser& NewScriptTokeniser( TextInputStream& istream ){ inline Tokeniser& NewSimpleTokeniser( TextInputStream& istream ){ return *( new ScriptTokeniser( istream, false ) ); } - -#endif diff --git a/libs/script/scripttokenwriter.h b/libs/script/scripttokenwriter.h index 35caed48..bdee5d80 100644 --- a/libs/script/scripttokenwriter.h +++ b/libs/script/scripttokenwriter.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SCRIPT_SCRIPTTOKENWRITER_H ) -#define INCLUDED_SCRIPT_SCRIPTTOKENWRITER_H +#pragma once #include "iscriplib.h" @@ -73,5 +72,3 @@ private: inline TokenWriter& NewSimpleTokenWriter( TextOutputStream& ostream ){ return *( new SimpleTokenWriter( ostream ) ); } - -#endif diff --git a/libs/selectionlib.h b/libs/selectionlib.h index 24fda5e5..89304e73 100644 --- a/libs/selectionlib.h +++ b/libs/selectionlib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_SELECTIONLIB_H ) -#define INCLUDED_SELECTIONLIB_H +#pragma once #include "iselection.h" #include "generic/callback.h" @@ -185,6 +184,3 @@ public: m_set.erase( it ); } }; - - -#endif diff --git a/libs/shaderlib.h b/libs/shaderlib.h index 712c3f47..003f7a8c 100644 --- a/libs/shaderlib.h +++ b/libs/shaderlib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_SHADERLIB_H ) -#define INCLUDED_SHADERLIB_H +#pragma once #include "string/string.h" #include "character.h" @@ -79,6 +78,3 @@ inline bool texdef_name_valid( const char* name ){ inline const char* texdef_name_default(){ return GlobalTexturePrefix_get(); } - - -#endif diff --git a/libs/signal/isignal.h b/libs/signal/isignal.h index 7877b2f7..7c274399 100644 --- a/libs/signal/isignal.h +++ b/libs/signal/isignal.h @@ -1,6 +1,5 @@ -#if !defined( INCLUDED_ISIGNAL_H ) -#define INCLUDED_ISIGNAL_H +#pragma once #include "generic/callback.h" #include "signal/signalfwd.h" @@ -201,5 +200,3 @@ inline SignalHandler3< typename Caller::fourth_argument_type >( BindFirstOpaque3( callee ) ); } - -#endif diff --git a/libs/signal/signal.h b/libs/signal/signal.h index 96b02f7c..72632eab 100644 --- a/libs/signal/signal.h +++ b/libs/signal/signal.h @@ -1,6 +1,5 @@ -#if !defined( INCLUDED_SIGNAL_H ) -#define INCLUDED_SIGNAL_H +#pragma once #include "isignal.h" #include "memory/allocator.h" @@ -338,5 +337,3 @@ public: invokeSignalHandlers( Base::begin(), Base::end(), Functor3Invoke( a1, a2, a3 ) ); } }; - -#endif diff --git a/libs/signal/signalfwd.h b/libs/signal/signalfwd.h index 6427b1c4..fe49247f 100644 --- a/libs/signal/signalfwd.h +++ b/libs/signal/signalfwd.h @@ -1,6 +1,5 @@ -#if !defined( INCLUDED_SIGNALFWD_H ) -#define INCLUDED_SIGNALFWD_H +#pragma once class SignalHandler; template @@ -40,5 +39,3 @@ public: }; typedef SignalFwd::handler_id_type SignalHandlerId; - -#endif diff --git a/libs/str.h b/libs/str.h index f315e60e..ed7eeec4 100644 --- a/libs/str.h +++ b/libs/str.h @@ -28,8 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __STR__ -#define __STR__ +#pragma once // // class Str @@ -500,7 +499,3 @@ inline bool ExtractPath_and_Filename( const char* pPath, Str& strPath, Str& strF } return true; } - - - -#endif diff --git a/libs/stream/filestream.h b/libs/stream/filestream.h index 8b762e8c..e5c6a615 100644 --- a/libs/stream/filestream.h +++ b/libs/stream/filestream.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STREAM_FILESTREAM_H ) -#define INCLUDED_STREAM_FILESTREAM_H +#pragma once #include "idatastream.h" #include @@ -168,6 +167,3 @@ inline bool file_copy( const char* source, const char* target ){ } return true; } - - -#endif diff --git a/libs/stream/memstream.h b/libs/stream/memstream.h index 90c197f4..73a8def2 100644 --- a/libs/stream/memstream.h +++ b/libs/stream/memstream.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STREAM_MEMSTREAM_H ) -#define INCLUDED_STREAM_MEMSTREAM_H +#pragma once #include "itextstream.h" #include @@ -70,5 +69,3 @@ public: return count; } }; - -#endif diff --git a/libs/stream/stringstream.h b/libs/stream/stringstream.h index 0b8892eb..e234bd98 100644 --- a/libs/stream/stringstream.h +++ b/libs/stream/stringstream.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STREAM_STRINGSTREAM_H ) -#define INCLUDED_STREAM_STRINGSTREAM_H +#pragma once #include "itextstream.h" #include "string/string.h" @@ -154,6 +153,3 @@ template inline StringOutputStream& operator<<( StringOutputStream& ostream, const T& t ){ return ostream_write( ostream, t ); } - - -#endif diff --git a/libs/stream/textfilestream.h b/libs/stream/textfilestream.h index 488f7e7e..df0e6d12 100644 --- a/libs/stream/textfilestream.h +++ b/libs/stream/textfilestream.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STREAM_TEXTFILESTREAM_H ) -#define INCLUDED_STREAM_TEXTFILESTREAM_H +#pragma once #include "itextstream.h" #include @@ -75,6 +74,3 @@ template inline TextFileOutputStream& operator<<( TextFileOutputStream& ostream, const T& t ){ return ostream_write( ostream, t ); } - - -#endif diff --git a/libs/stream/textstream.h b/libs/stream/textstream.h index 9abbca16..b4c338e4 100644 --- a/libs/stream/textstream.h +++ b/libs/stream/textstream.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STREAM_TEXTSTREAM_H ) -#define INCLUDED_STREAM_TEXTSTREAM_H +#pragma once /// \file /// \brief Text-output-formatting. @@ -466,5 +465,3 @@ public: } } }; - -#endif diff --git a/libs/string/pooledstring.h b/libs/string/pooledstring.h index c98db9dd..49d48681 100644 --- a/libs/string/pooledstring.h +++ b/libs/string/pooledstring.h @@ -1,6 +1,5 @@ -#if !defined( INCLUDED_POOLEDSTRING_H ) -#define INCLUDED_POOLEDSTRING_H +#pragma once #include #include "generic/static.h" @@ -88,6 +87,3 @@ public: return ( *m_i ).key; } }; - - -#endif diff --git a/libs/string/string.h b/libs/string/string.h index 3d627d80..1240cf05 100644 --- a/libs/string/string.h +++ b/libs/string/string.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STRING_STRING_H ) -#define INCLUDED_STRING_STRING_H +#pragma once /// \file /// C-style null-terminated-character-array string library. @@ -601,5 +600,3 @@ struct RawStringLessNoCase return string_less_nocase( x, y ); } }; - -#endif diff --git a/libs/string/stringfwd.h b/libs/string/stringfwd.h index d3d634e0..5115919d 100644 --- a/libs/string/stringfwd.h +++ b/libs/string/stringfwd.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STRING_STRINGFWD_H ) -#define INCLUDED_STRING_STRINGFWD_H +#pragma once // forward-declaration of CopiedString @@ -31,5 +30,3 @@ class CopiedBuffer; template class String; typedef String< CopiedBuffer< DefaultAllocator > > CopiedString; - -#endif diff --git a/libs/stringio.h b/libs/stringio.h index 6b87b701..b91ebccd 100644 --- a/libs/stringio.h +++ b/libs/stringio.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_STRINGIO_H ) -#define INCLUDED_STRINGIO_H +#pragma once #include #include @@ -497,5 +496,3 @@ template inline StringExportCallback makeSizeStringExportCallback( const Caller& caller ){ return StringExportCallback( caller.getEnvironment(), ImportConvert1::thunk ); } - -#endif diff --git a/libs/texturelib.h b/libs/texturelib.h index d9da1e89..61a3aa37 100644 --- a/libs/texturelib.h +++ b/libs/texturelib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_TEXTURELIB_H ) -#define INCLUDED_TEXTURELIB_H +#pragma once #include "generic/vector.h" typedef Vector3 Colour3; @@ -39,5 +38,3 @@ struct qtexture_t Colour3 color; // for flat shade mode int surfaceFlags, contentFlags, value; }; - -#endif diff --git a/libs/transformlib.h b/libs/transformlib.h index 9dbc2ac0..b1bfc249 100644 --- a/libs/transformlib.h +++ b/libs/transformlib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_TRANSFORMLIB_H ) -#define INCLUDED_TRANSFORMLIB_H +#pragma once #include "generic/constant.h" #include "math/matrix.h" @@ -289,6 +288,3 @@ public: m_skew = c_skew_identity; } }; - - -#endif diff --git a/libs/traverselib.h b/libs/traverselib.h index 90b0d9b6..84f40ba7 100644 --- a/libs/traverselib.h +++ b/libs/traverselib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_TRAVERSELIB_H ) -#define INCLUDED_TRAVERSELIB_H +#pragma once #include "debugging/debugging.h" @@ -359,6 +358,3 @@ public: forEach( TraversableObserverErase( node ) ); } }; - - -#endif diff --git a/libs/typesystem.h b/libs/typesystem.h index fd242c44..e8f4908a 100644 --- a/libs/typesystem.h +++ b/libs/typesystem.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_TYPESYSTEM_H ) -#define INCLUDED_TYPESYSTEM_H +#pragma once #include @@ -132,6 +131,3 @@ public: return &reinterpret_cast( p )->get( NullType() ); } }; - - -#endif diff --git a/libs/undolib.h b/libs/undolib.h index 8d7c41e9..3ffd227d 100644 --- a/libs/undolib.h +++ b/libs/undolib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_UNDOLIB_H ) -#define INCLUDED_UNDOLIB_H +#pragma once #include "iundo.h" #include "mapfile.h" @@ -137,5 +136,3 @@ public: m_object = ( static_cast*>( state ) )->get(); } }; - -#endif diff --git a/libs/uniquenames.h b/libs/uniquenames.h index 6ff544be..8ce72a39 100644 --- a/libs/uniquenames.h +++ b/libs/uniquenames.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_UNIQUENAMES_H ) -#define INCLUDED_UNIQUENAMES_H +#pragma once #include "debugging/debugging.h" #include @@ -328,6 +327,3 @@ public: const TestUniqueName g_testuniquename; #endif - - -#endif diff --git a/libs/versionlib.h b/libs/versionlib.h index e44961f0..1e211e7b 100644 --- a/libs/versionlib.h +++ b/libs/versionlib.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_VERSIONLIB_H ) -#define INCLUDED_VERSIONLIB_H +#pragma once #include #include @@ -80,5 +79,3 @@ inline Version version_parse( const char* versionString ){ return version; } - -#endif diff --git a/libs/xml/ixml.h b/libs/xml/ixml.h index 59f8e17a..fbb719d6 100644 --- a/libs/xml/ixml.h +++ b/libs/xml/ixml.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_XML_IXML_H ) -#define INCLUDED_XML_IXML_H +#pragma once #include "itextstream.h" #include "generic/constant.h" @@ -55,6 +54,3 @@ public: virtual void exportXML( XMLImporter& importer ) = 0; }; - - -#endif diff --git a/libs/xml/xmlelement.h b/libs/xml/xmlelement.h index 8ca7d2da..4bbd5163 100644 --- a/libs/xml/xmlelement.h +++ b/libs/xml/xmlelement.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_XML_XMLELEMENT_H ) -#define INCLUDED_XML_XMLELEMENT_H +#pragma once #include "xml/ixml.h" #include "string/string.h" @@ -95,5 +94,3 @@ private: CopiedString m_name; attrs_t m_attrs; }; - -#endif diff --git a/libs/xml/xmlparser.h b/libs/xml/xmlparser.h index 185c26cd..df915690 100644 --- a/libs/xml/xmlparser.h +++ b/libs/xml/xmlparser.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_XML_XMLPARSER_H ) -#define INCLUDED_XML_XMLPARSER_H +#pragma once #include #include @@ -213,7 +212,3 @@ public: private: TextInputStream& m_istream; }; - - - -#endif diff --git a/libs/xml/xmltextags.h b/libs/xml/xmltextags.h index 4e8555cf..5523e9be 100644 --- a/libs/xml/xmltextags.h +++ b/libs/xml/xmltextags.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_XMLTEXTAGS_H ) -#define INCLUDED_XMLTEXTAGS_H +#pragma once #include #include @@ -99,5 +98,3 @@ public: void GetAllTags( std::set& tags ); void TagSearch( const char* expression, std::set& paths ); }; - -#endif diff --git a/libs/xml/xmlwriter.h b/libs/xml/xmlwriter.h index be660236..12e20a9b 100644 --- a/libs/xml/xmlwriter.h +++ b/libs/xml/xmlwriter.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_XML_XMLWRITER_H ) -#define INCLUDED_XML_XMLWRITER_H +#pragma once #include "convert.h" #include @@ -173,6 +172,3 @@ public: write_quoted_string( value ); } }; - - -#endif diff --git a/plugins/archivepak/archive.h b/plugins/archivepak/archive.h index 309cef5b..8981f066 100644 --- a/plugins/archivepak/archive.h +++ b/plugins/archivepak/archive.h @@ -19,5 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#pragma once + class Archive; Archive* OpenArchive( const char* name ); diff --git a/plugins/archivepak/pak.h b/plugins/archivepak/pak.h index 22051568..ec3a0958 100644 --- a/plugins/archivepak/pak.h +++ b/plugins/archivepak/pak.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PAK_H ) -#define INCLUDED_PAK_H +#pragma once struct pakheader_t { @@ -35,5 +34,3 @@ struct pakentry_t unsigned int offset; // Position of the entry in PACK file unsigned int size; // Size of the entry in PACK file }; - -#endif diff --git a/plugins/archivepak/plugin.h b/plugins/archivepak/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/archivepak/plugin.h +++ b/plugins/archivepak/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/archivewad/archive.h b/plugins/archivewad/archive.h index 309cef5b..8981f066 100644 --- a/plugins/archivewad/archive.h +++ b/plugins/archivewad/archive.h @@ -19,5 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#pragma once + class Archive; Archive* OpenArchive( const char* name ); diff --git a/plugins/archivewad/plugin.h b/plugins/archivewad/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/archivewad/plugin.h +++ b/plugins/archivewad/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/archivewad/wad.h b/plugins/archivewad/wad.h index 617900c3..42ba9459 100644 --- a/plugins/archivewad/wad.h +++ b/plugins/archivewad/wad.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_WAD_H ) -#define INCLUDED_WAD_H +#pragma once #include "bytestreamutils.h" #include "idatastream.h" @@ -72,5 +71,3 @@ inline void istream_read_lumpinfo( InputStream& istream, lumpinfo_t& lumpinfo ){ lumpinfo.pad2 = istream_read_byte( istream ); istream.read( reinterpret_cast( lumpinfo.name ), 16 ); } - -#endif diff --git a/plugins/archivezip/archive.h b/plugins/archivezip/archive.h index 04ed6e33..6c112a28 100644 --- a/plugins/archivezip/archive.h +++ b/plugins/archivezip/archive.h @@ -19,4 +19,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#pragma once + Archive* OpenArchive( const char* name ); diff --git a/plugins/archivezip/pkzip.h b/plugins/archivezip/pkzip.h index 921293b5..fd673a73 100644 --- a/plugins/archivezip/pkzip.h +++ b/plugins/archivezip/pkzip.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PKZIP_H ) -#define INCLUDED_PKZIP_H +#pragma once #include "bytestreamutils.h" #include "idatastream.h" @@ -253,5 +252,3 @@ inline SeekableStream::position_type pkzip_find_disk_trailer( SeekableInputStrea return 0; } } - -#endif diff --git a/plugins/archivezip/plugin.h b/plugins/archivezip/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/archivezip/plugin.h +++ b/plugins/archivezip/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/archivezip/zlibstream.h b/plugins/archivezip/zlibstream.h index c2f3887a..7245948f 100644 --- a/plugins/archivezip/zlibstream.h +++ b/plugins/archivezip/zlibstream.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ZLIBSTREAM_H ) -#define INCLUDED_ZLIBSTREAM_H +#pragma once #include "zlib.h" #include "idatastream.h" @@ -64,5 +63,3 @@ public: return length - m_zipstream.avail_out; } }; - -#endif diff --git a/plugins/assmodel/mdlimage.h b/plugins/assmodel/mdlimage.h index 82de20cc..294b3b5a 100644 --- a/plugins/assmodel/mdlimage.h +++ b/plugins/assmodel/mdlimage.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MDLIMAGE_H ) -#define INCLUDED_MDLIMAGE_H +#pragma once class Image; class ArchiveFile; @@ -29,5 +28,3 @@ class Importer; } Image* LoadMDLImage( Assimp::Importer& importer, ArchiveFile& file ); - -#endif diff --git a/plugins/assmodel/model.h b/plugins/assmodel/model.h index 19d6523a..708a1a6b 100644 --- a/plugins/assmodel/model.h +++ b/plugins/assmodel/model.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODEL_H ) -#define INCLUDED_MODEL_H +#pragma once namespace scene { class Node; @@ -30,5 +29,3 @@ namespace Assimp{ class Importer; } scene::Node& loadPicoModel( Assimp::Importer& importer, ArchiveFile& file ); - -#endif diff --git a/plugins/assmodel/plugin.h b/plugins/assmodel/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/assmodel/plugin.h +++ b/plugins/assmodel/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/entity/angle.h b/plugins/entity/angle.h index 18f0d6c4..3daaa342 100644 --- a/plugins/entity/angle.h +++ b/plugins/entity/angle.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ANGLE_H ) -#define INCLUDED_ANGLE_H +#pragma once #include "ientity.h" @@ -93,5 +92,3 @@ inline float angle_rotated( float angle, const Quaternion& rotation ){ ).z() ); } - -#endif diff --git a/plugins/entity/angles.h b/plugins/entity/angles.h index 58010a1a..743dbf94 100644 --- a/plugins/entity/angles.h +++ b/plugins/entity/angles.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ANGLES_H ) -#define INCLUDED_ANGLES_H +#pragma once #include "ientity.h" @@ -186,6 +185,3 @@ public: write_angles( m_angles, entity ); } }; - - -#endif diff --git a/plugins/entity/colour.h b/plugins/entity/colour.h index b5cd860b..bc7b381a 100644 --- a/plugins/entity/colour.h +++ b/plugins/entity/colour.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_COLOUR_H ) -#define INCLUDED_COLOUR_H +#pragma once #include "ientity.h" #include "irender.h" @@ -93,5 +92,3 @@ public: return m_state_additive; } }; - -#endif diff --git a/plugins/entity/curve.h b/plugins/entity/curve.h index 37fac120..35b43a9a 100644 --- a/plugins/entity/curve.h +++ b/plugins/entity/curve.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CURVE_H ) -#define INCLUDED_CURVE_H +#pragma once #include "ientity.h" #include "selectable.h" @@ -452,6 +451,3 @@ public: const char* const curve_Nurbs = "curve_Nurbs"; const char* const curve_CatmullRomSpline = "curve_CatmullRomSpline"; - - -#endif diff --git a/plugins/entity/doom3group.h b/plugins/entity/doom3group.h index 42fdfd2e..7e9ee695 100644 --- a/plugins/entity/doom3group.h +++ b/plugins/entity/doom3group.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STATIC_H ) -#define INCLUDED_STATIC_H +#pragma once namespace scene { @@ -31,5 +30,3 @@ class EntityClass; void Doom3Group_construct(); void Doom3Group_destroy(); scene::Node& New_Doom3Group( EntityClass* eclass ); - -#endif diff --git a/plugins/entity/eclassmodel.h b/plugins/entity/eclassmodel.h index bdfd51e3..2c760dcb 100644 --- a/plugins/entity/eclassmodel.h +++ b/plugins/entity/eclassmodel.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ECLASSMODEL_H ) -#define INCLUDED_ECLASSMODEL_H +#pragma once namespace scene { @@ -31,5 +30,3 @@ class EntityClass; scene::Node& New_EclassModel( EntityClass* eclass ); #include "entity.h" - -#endif diff --git a/plugins/entity/entity.h b/plugins/entity/entity.h index c9ae285e..a81554e3 100644 --- a/plugins/entity/entity.h +++ b/plugins/entity/entity.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ENTITY_H ) -#define INCLUDED_ENTITY_H +#pragma once class EntityCreator; EntityCreator& GetEntityCreator(); @@ -49,5 +48,3 @@ extern bool g_showAngles; extern bool g_lightRadii; extern bool g_stupidQuakeBug; - -#endif diff --git a/plugins/entity/filters.h b/plugins/entity/filters.h index 774d15cb..329b8b3d 100644 --- a/plugins/entity/filters.h +++ b/plugins/entity/filters.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_FILTERS_H ) -#define INCLUDED_FILTERS_H +#pragma once #include "ifilter.h" @@ -71,5 +70,3 @@ public: } typedef MemberCaller1 ClassnameChangedCaller; }; - -#endif diff --git a/plugins/entity/generic.h b/plugins/entity/generic.h index 1f9c2cda..f8875375 100644 --- a/plugins/entity/generic.h +++ b/plugins/entity/generic.h @@ -19,9 +19,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GENERIC_H ) -#define INCLUDED_GENERIC_H +#pragma once scene::Node& New_GenericEntity( EntityClass* eclass ); - -#endif diff --git a/plugins/entity/group.h b/plugins/entity/group.h index 599b8c7a..beac8f2a 100644 --- a/plugins/entity/group.h +++ b/plugins/entity/group.h @@ -19,9 +19,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GROUP_H ) -#define INCLUDED_GROUP_H +#pragma once scene::Node& New_Group( EntityClass* eclass ); - -#endif diff --git a/plugins/entity/keyobservers.h b/plugins/entity/keyobservers.h index 0cef953d..0941d01f 100644 --- a/plugins/entity/keyobservers.h +++ b/plugins/entity/keyobservers.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_KEYOBSERVERS_H ) -#define INCLUDED_KEYOBSERVERS_H +#pragma once #include "entitylib.h" #include @@ -46,5 +45,3 @@ public: } } }; - -#endif diff --git a/plugins/entity/light.h b/plugins/entity/light.h index 4eaf7d8a..03fbf153 100644 --- a/plugins/entity/light.h +++ b/plugins/entity/light.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_LIGHT_H ) -#define INCLUDED_LIGHT_H +#pragma once namespace scene { @@ -37,5 +36,3 @@ enum LightType }; void Light_Construct( LightType lightType ); void Light_Destroy(); - -#endif diff --git a/plugins/entity/miscmodel.h b/plugins/entity/miscmodel.h index a6fba44c..e1fae167 100644 --- a/plugins/entity/miscmodel.h +++ b/plugins/entity/miscmodel.h @@ -19,11 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MISCMODEL_H ) -#define INCLUDED_MISCMODEL_H +#pragma once scene::Node& New_MiscModel( EntityClass* eclass ); void MiscModel_construct(); void MiscModel_destroy(); - -#endif diff --git a/plugins/entity/model.h b/plugins/entity/model.h index 75a8cab4..d5c92e82 100644 --- a/plugins/entity/model.h +++ b/plugins/entity/model.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODEL_H ) -#define INCLUDED_MODEL_H +#pragma once #include "entitylib.h" #include "traverselib.h" @@ -105,5 +104,3 @@ public: return m_model.getNode(); } }; - -#endif diff --git a/plugins/entity/modelskinkey.h b/plugins/entity/modelskinkey.h index 16da57bc..6966a1c6 100644 --- a/plugins/entity/modelskinkey.h +++ b/plugins/entity/modelskinkey.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODELSKINKEY_H ) -#define INCLUDED_MODELSKINKEY_H +#pragma once #include "modelskin.h" @@ -93,5 +92,3 @@ inline void Node_modelSkinChanged( scene::Node& node ){ ASSERT_NOTNULL( instantiable ); instantiable->forEachInstance( InstanceSkinChanged() ); } - -#endif diff --git a/plugins/entity/namedentity.h b/plugins/entity/namedentity.h index fa465b68..d7f9d88b 100644 --- a/plugins/entity/namedentity.h +++ b/plugins/entity/namedentity.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_NAMEDENTITY_H ) -#define INCLUDED_NAMEDENTITY_H +#pragma once #include "entitylib.h" #include "eclasslib.h" @@ -186,6 +185,3 @@ void render( RenderStateFlags state ) const { } }; */ - - -#endif diff --git a/plugins/entity/namekeys.h b/plugins/entity/namekeys.h index 7d9e1c1b..3755b357 100644 --- a/plugins/entity/namekeys.h +++ b/plugins/entity/namekeys.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_NAMEKEYS_H ) -#define INCLUDED_NAMEKEYS_H +#pragma once #include #include @@ -130,5 +129,3 @@ inline bool keyIsNameQuake3( const char* key ){ || string_equal( key, "killtarget" ) || ( string_equal_n( key, "target", 6 ) && string_is_integer( key + 6 ) ); // Nexuiz } - -#endif diff --git a/plugins/entity/origin.h b/plugins/entity/origin.h index 4996626e..e41f0b08 100644 --- a/plugins/entity/origin.h +++ b/plugins/entity/origin.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ORIGIN_H ) -#define INCLUDED_ORIGIN_H +#pragma once #include "ientity.h" @@ -144,6 +143,3 @@ public: } } }; - - -#endif diff --git a/plugins/entity/plugin.h b/plugins/entity/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/entity/plugin.h +++ b/plugins/entity/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/entity/rotation.h b/plugins/entity/rotation.h index 275263f4..8ce476c4 100644 --- a/plugins/entity/rotation.h +++ b/plugins/entity/rotation.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ROTATION_H ) -#define INCLUDED_ROTATION_H +#pragma once #include "ientity.h" @@ -179,5 +178,3 @@ public: } } }; - -#endif diff --git a/plugins/entity/scale.h b/plugins/entity/scale.h index 1d578a51..1b301346 100644 --- a/plugins/entity/scale.h +++ b/plugins/entity/scale.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SCALE_H ) -#define INCLUDED_SCALE_H +#pragma once #include "ientity.h" @@ -117,6 +116,3 @@ public: write_scale( m_scale, entity ); } }; - - -#endif diff --git a/plugins/entity/skincache.h b/plugins/entity/skincache.h index 9a8e836f..f2653f18 100644 --- a/plugins/entity/skincache.h +++ b/plugins/entity/skincache.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SKINCACHE_H ) -#define INCLUDED_SKINCACHE_H +#pragma once class ModuleServer; void Doom3ModelSkinCacheModule_selfRegister( ModuleServer& server ); - -#endif diff --git a/plugins/entity/targetable.h b/plugins/entity/targetable.h index 113abf51..f110533e 100644 --- a/plugins/entity/targetable.h +++ b/plugins/entity/targetable.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_TARGETABLE_H ) -#define INCLUDED_TARGETABLE_H +#pragma once #include #include @@ -448,5 +447,3 @@ public: }; typedef Static StaticRenderableConnectionLines; - -#endif diff --git a/plugins/image/bmp.h b/plugins/image/bmp.h index bbb0714e..b7203b03 100644 --- a/plugins/image/bmp.h +++ b/plugins/image/bmp.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_BMP_H ) -#define INCLUDED_BMP_H +#pragma once class Image; class ArchiveFile; Image* LoadBMP( ArchiveFile& file ); - -#endif diff --git a/plugins/image/dds.h b/plugins/image/dds.h index 1847edb9..028bd0b0 100644 --- a/plugins/image/dds.h +++ b/plugins/image/dds.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_DDS_H ) -#define INCLUDED_DDS_H +#pragma once class Image; class ArchiveFile; Image* LoadDDS( ArchiveFile& file ); - -#endif diff --git a/plugins/image/image.h b/plugins/image/image.h index c61bcc20..bb3d2bdd 100644 --- a/plugins/image/image.h +++ b/plugins/image/image.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IMAGE_H ) -#define INCLUDED_IMAGE_H - -#endif +#pragma once diff --git a/plugins/image/jpeg.h b/plugins/image/jpeg.h index 110f9ad6..e8bfe8af 100644 --- a/plugins/image/jpeg.h +++ b/plugins/image/jpeg.h @@ -28,12 +28,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined ( INCLUDED_JPEG_H ) -#define INCLUDED_JPEG_H +#pragma once class Image; class ArchiveFile; Image* LoadJPG( ArchiveFile& file ); - -#endif diff --git a/plugins/image/ktx.h b/plugins/image/ktx.h index 6070077b..f71838cb 100644 --- a/plugins/image/ktx.h +++ b/plugins/image/ktx.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_KTX_H ) -#define INCLUDED_KTX_H +#pragma once class Image; class ArchiveFile; Image* LoadKTX( ArchiveFile& file ); - -#endif diff --git a/plugins/image/pcx.h b/plugins/image/pcx.h index 63d2753a..0c83c069 100644 --- a/plugins/image/pcx.h +++ b/plugins/image/pcx.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_PCX_H ) -#define INCLUDED_PCX_H +#pragma once class Image; class ArchiveFile; Image* LoadPCX32( ArchiveFile& file ); - -#endif diff --git a/plugins/image/tga.h b/plugins/image/tga.h index c67fea30..bbbe0732 100644 --- a/plugins/image/tga.h +++ b/plugins/image/tga.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_TGA_H ) -#define INCLUDED_TGA_H +#pragma once class Image; class ArchiveFile; Image* LoadTGA( ArchiveFile& file ); - -#endif diff --git a/plugins/imagehl/hlw.h b/plugins/imagehl/hlw.h index 33138237..d00c45de 100644 --- a/plugins/imagehl/hlw.h +++ b/plugins/imagehl/hlw.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_HLW_H ) -#define INCLUDED_HLW_H +#pragma once class Image; class ArchiveFile; Image* LoadHLW( ArchiveFile& file ); - -#endif diff --git a/plugins/imagehl/imagehl.h b/plugins/imagehl/imagehl.h index 6d0b7765..bb3d2bdd 100644 --- a/plugins/imagehl/imagehl.h +++ b/plugins/imagehl/imagehl.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IMAGEHL_H ) -#define INCLUDED_IMAGEHL_H - -#endif +#pragma once diff --git a/plugins/imagehl/mip.h b/plugins/imagehl/mip.h index ea11d8ff..056162c7 100644 --- a/plugins/imagehl/mip.h +++ b/plugins/imagehl/mip.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_MIP_H ) -#define INCLUDED_MIP_H +#pragma once class Image; class ArchiveFile; Image* LoadMIP( ArchiveFile& file ); - -#endif diff --git a/plugins/imagehl/sprite.h b/plugins/imagehl/sprite.h index d6635d94..b73ee528 100644 --- a/plugins/imagehl/sprite.h +++ b/plugins/imagehl/sprite.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_SPRITE_H ) -#define INCLUDED_SPRITE_H +#pragma once class Image; class ArchiveFile; Image* LoadIDSP( ArchiveFile& file ); - -#endif diff --git a/plugins/imagepng/plugin.h b/plugins/imagepng/plugin.h index 271a2ad2..a0f829b4 100644 --- a/plugins/imagepng/plugin.h +++ b/plugins/imagepng/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/imageq2/imageq2.h b/plugins/imageq2/imageq2.h index 38374374..bb3d2bdd 100644 --- a/plugins/imageq2/imageq2.h +++ b/plugins/imageq2/imageq2.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IMAGEQ2_H ) -#define INCLUDED_IMAGEQ2_H - -#endif +#pragma once diff --git a/plugins/imageq2/wal.h b/plugins/imageq2/wal.h index dac84d12..80795a15 100644 --- a/plugins/imageq2/wal.h +++ b/plugins/imageq2/wal.h @@ -19,13 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_WAL_H ) -#define INCLUDED_WAL_H +#pragma once class Image; class ArchiveFile; Image* LoadWal( ArchiveFile& file ); Image* LoadM8( ArchiveFile& file ); - -#endif diff --git a/plugins/imageq2/wal32.h b/plugins/imageq2/wal32.h index 25f6dac6..012407d9 100644 --- a/plugins/imageq2/wal32.h +++ b/plugins/imageq2/wal32.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_WAL32_H ) -#define INCLUDED_WAL32_H +#pragma once class Image; class ArchiveFile; Image* LoadM32( ArchiveFile& file ); - -#endif diff --git a/plugins/mapq3/parse.h b/plugins/mapq3/parse.h index 9b6d1d2d..3fda568b 100644 --- a/plugins/mapq3/parse.h +++ b/plugins/mapq3/parse.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PARSE_H ) -#define INCLUDED_PARSE_H +#pragma once #include "imap.h" @@ -44,5 +43,3 @@ class Node; typedef SmartReference > NodeSmartReference; extern NodeSmartReference g_nullNode; - -#endif diff --git a/plugins/mapq3/plugin.h b/plugins/mapq3/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/mapq3/plugin.h +++ b/plugins/mapq3/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/mapq3/write.h b/plugins/mapq3/write.h index e934ef64..1c61bb77 100644 --- a/plugins/mapq3/write.h +++ b/plugins/mapq3/write.h @@ -19,11 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_WRITE_H ) -#define INCLUDED_WRITE_H +#pragma once #include "imap.h" void Map_Write( scene::Node& root, GraphTraversalFunc traverse, TokenWriter& writer, bool ignorePatches ); - -#endif diff --git a/plugins/mapxml/plugin.h b/plugins/mapxml/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/mapxml/plugin.h +++ b/plugins/mapxml/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/mapxml/xmlparse.h b/plugins/mapxml/xmlparse.h index b14b9671..fa408eda 100644 --- a/plugins/mapxml/xmlparse.h +++ b/plugins/mapxml/xmlparse.h @@ -19,11 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_XMLPARSE_H ) -#define INCLUDED_XMLPARSE_H +#pragma once #include "imap.h" void Map_Read( scene::Node& root, TextInputStream& in, EntityCreator& entityTable ); - -#endif diff --git a/plugins/mapxml/xmlwrite.h b/plugins/mapxml/xmlwrite.h index fb6c91db..95112b64 100644 --- a/plugins/mapxml/xmlwrite.h +++ b/plugins/mapxml/xmlwrite.h @@ -19,11 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_XMLWRITE_H ) -#define INCLUDED_XMLWRITE_H +#pragma once #include "imap.h" void Map_Write( scene::Node& root, GraphTraversalFunc traverse, TextOutputStream& out ); - -#endif diff --git a/plugins/md3model/ident.h b/plugins/md3model/ident.h index d14eabc2..6b66967c 100644 --- a/plugins/md3model/ident.h +++ b/plugins/md3model/ident.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_IDENT_H ) -#define INCLUDED_IDENT_H +#pragma once #include @@ -28,5 +27,3 @@ inline bool ident_equal( const unsigned char* ident, const unsigned char* other ){ return ident[0] == other[0] && ident[1] == other[1] && ident[2] == other[2] && ident[3] == other[3]; } - -#endif diff --git a/plugins/md3model/md2.h b/plugins/md3model/md2.h index 9c93edc9..b07a4896 100644 --- a/plugins/md3model/md2.h +++ b/plugins/md3model/md2.h @@ -19,14 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MD2_H ) -#define INCLUDED_MD2_H +#pragma once namespace scene { class Node; } class ArchiveFile; scene::Node& loadMD2Model( ArchiveFile& file ); - - -#endif diff --git a/plugins/md3model/md3.h b/plugins/md3model/md3.h index 235d23b6..4e465863 100644 --- a/plugins/md3model/md3.h +++ b/plugins/md3model/md3.h @@ -19,13 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MD3_H ) -#define INCLUDED_MD3_H +#pragma once namespace scene { class Node; } class ArchiveFile; scene::Node& loadMD3Model( ArchiveFile& file ); - -#endif diff --git a/plugins/md3model/md3normals.h b/plugins/md3model/md3normals.h index 10c7d28b..c079925c 100644 --- a/plugins/md3model/md3normals.h +++ b/plugins/md3model/md3normals.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MD3NORMALS_H ) -#define INCLUDED_MD3NORMALS_H +#pragma once #include "render.h" @@ -37,5 +36,3 @@ inline Normal3f DecodeNormal( const byte bytes[2] ){ static_cast( cos( lng ) ) ); } - -#endif diff --git a/plugins/md3model/md5.h b/plugins/md3model/md5.h index 5d40e168..94f2716b 100644 --- a/plugins/md3model/md5.h +++ b/plugins/md3model/md5.h @@ -19,13 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MD5_H ) -#define INCLUDED_MD5_H +#pragma once namespace scene { class Node; } class ArchiveFile; scene::Node& loadMD5Model( ArchiveFile& file ); - -#endif diff --git a/plugins/md3model/mdc.h b/plugins/md3model/mdc.h index 2435842b..2ff5f05e 100644 --- a/plugins/md3model/mdc.h +++ b/plugins/md3model/mdc.h @@ -19,14 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MDC_H ) -#define INCLUDED_MDC_H +#pragma once namespace scene { class Node; } class ArchiveFile; scene::Node& loadMDCModel( ArchiveFile& file ); - - -#endif diff --git a/plugins/md3model/mdl.h b/plugins/md3model/mdl.h index d10e518f..858cbe67 100644 --- a/plugins/md3model/mdl.h +++ b/plugins/md3model/mdl.h @@ -19,13 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MDL_H ) -#define INCLUDED_MDL_H +#pragma once namespace scene { class Node; } class ArchiveFile; scene::Node& loadMDLModel( ArchiveFile& file ); - -#endif diff --git a/plugins/md3model/mdlformat.h b/plugins/md3model/mdlformat.h index 948c5439..8c6bbb80 100644 --- a/plugins/md3model/mdlformat.h +++ b/plugins/md3model/mdlformat.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MDLFORMAT_H ) -#define INCLUDED_MDLFORMAT_H +#pragma once typedef unsigned char byte; @@ -114,5 +113,3 @@ typedef struct { typedef struct { aliasskintype_t type; } mdlSkinType_t; - -#endif diff --git a/plugins/md3model/mdlimage.h b/plugins/md3model/mdlimage.h index 8652a1da..b3c623f2 100644 --- a/plugins/md3model/mdlimage.h +++ b/plugins/md3model/mdlimage.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MDLIMAGE_H ) -#define INCLUDED_MDLIMAGE_H +#pragma once class Image; class ArchiveFile; Image* LoadMDLImage( ArchiveFile& file ); - -#endif diff --git a/plugins/md3model/mdlnormals.h b/plugins/md3model/mdlnormals.h index d9407ef5..48ea6b7c 100644 --- a/plugins/md3model/mdlnormals.h +++ b/plugins/md3model/mdlnormals.h @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#pragma once typedef const float mdlNormal_t[3]; typedef const mdlNormal_t mdlNormals_t[162]; diff --git a/plugins/md3model/model.h b/plugins/md3model/model.h index 3df3d4cc..757bee68 100644 --- a/plugins/md3model/model.h +++ b/plugins/md3model/model.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODEL_H ) -#define INCLUDED_MODEL_H +#pragma once #include "cullable.h" #include "renderable.h" @@ -565,5 +564,3 @@ inline void Model_constructNull( Model& model ){ model.updateAABB(); } - -#endif diff --git a/plugins/md3model/plugin.h b/plugins/md3model/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/md3model/plugin.h +++ b/plugins/md3model/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/model/model.h b/plugins/model/model.h index e0b8192e..3d0f64f3 100644 --- a/plugins/model/model.h +++ b/plugins/model/model.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODEL_H ) -#define INCLUDED_MODEL_H +#pragma once namespace scene { class Node; @@ -28,5 +27,3 @@ class Node; class ArchiveFile; typedef struct picoModule_s picoModule_t; scene::Node& loadPicoModel( const picoModule_t* module, ArchiveFile& file ); - -#endif diff --git a/plugins/model/plugin.h b/plugins/model/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/model/plugin.h +++ b/plugins/model/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/sample/sample.h b/plugins/sample/sample.h index c6bfe6ce..bb3d2bdd 100644 --- a/plugins/sample/sample.h +++ b/plugins/sample/sample.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SAMPLE_H ) -#define INCLUDED_SAMPLE_H - -#endif +#pragma once diff --git a/plugins/shaders/plugin.h b/plugins/shaders/plugin.h index 443a80e6..bb3d2bdd 100644 --- a/plugins/shaders/plugin.h +++ b/plugins/shaders/plugin.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H - -#endif +#pragma once diff --git a/plugins/shaders/shaders.h b/plugins/shaders/shaders.h index 88f193f9..57225db3 100644 --- a/plugins/shaders/shaders.h +++ b/plugins/shaders/shaders.h @@ -28,8 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined( INCLUDED_SHADERS_H ) -#define INCLUDED_SHADERS_H +#pragma once void Shaders_Construct(); void Shaders_Destroy(); @@ -50,6 +49,3 @@ extern bool g_enableDefaultShaders; extern bool g_useShaderList; struct _QERPlugImageTable; extern _QERPlugImageTable* g_bitmapModule; - - -#endif diff --git a/plugins/spritemodel/plugin.h b/plugins/spritemodel/plugin.h index aa459c55..97f5e2e9 100644 --- a/plugins/spritemodel/plugin.h +++ b/plugins/spritemodel/plugin.h @@ -26,8 +26,7 @@ // Based on MD3Model source code by SPoG // -#ifndef _PLUGIN_H_ -#define _PLUGIN_H_ +#pragma once #include "mathlib.h" #include @@ -43,5 +42,3 @@ extern _QERFuncTable_1 __QERTABLENAME; extern OpenGLBinding __QGLTABLENAME; #include "imodel.h" - -#endif // _PLUGIN_H_ diff --git a/plugins/spritemodel/spritemodel.h b/plugins/spritemodel/spritemodel.h index 9c715ac9..e2bbeb1f 100644 --- a/plugins/spritemodel/spritemodel.h +++ b/plugins/spritemodel/spritemodel.h @@ -26,6 +26,8 @@ // Based on MD3Model source code by SPoG // +#pragma once + #include "plugin.h" /*! i guess a description should go here... */ diff --git a/plugins/vfspk3/archive.h b/plugins/vfspk3/archive.h index 3530b48f..47a47c38 100644 --- a/plugins/vfspk3/archive.h +++ b/plugins/vfspk3/archive.h @@ -19,11 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ARCHIVE_H ) -#define INCLUDED_ARCHIVE_H +#pragma once #include "iarchive.h" const _QERArchiveTable* GetArchiveTable( ArchiveModules& archiveModules, const char* type ); - -#endif diff --git a/plugins/vfspk3/vfs.h b/plugins/vfspk3/vfs.h index 5d7762ab..2fb50f2d 100644 --- a/plugins/vfspk3/vfs.h +++ b/plugins/vfspk3/vfs.h @@ -28,12 +28,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined( INCLUDED_VFS_H ) -#define INCLUDED_VFS_H +#pragma once void FileSystem_Init(); void FileSystem_Shutdown(); class VirtualFileSystem; VirtualFileSystem& GetFileSystem(); - -#endif diff --git a/plugins/vfspk3/vfspk3.h b/plugins/vfspk3/vfspk3.h index f5fb5c0b..bb3d2bdd 100644 --- a/plugins/vfspk3/vfspk3.h +++ b/plugins/vfspk3/vfspk3.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_VFSPK3_H ) -#define INCLUDED_VFSPK3_H - -#endif +#pragma once diff --git a/radiant/autosave.h b/radiant/autosave.h index 40422331..35d253f8 100644 --- a/radiant/autosave.h +++ b/radiant/autosave.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_AUTOSAVE_H ) -#define INCLUDED_AUTOSAVE_H +#pragma once extern bool g_SnapShots_Enabled; @@ -30,6 +29,3 @@ void Map_Snapshot(); void Autosave_Construct(); void Autosave_Destroy(); - - -#endif diff --git a/radiant/brush.h b/radiant/brush.h index 1dce5aaa..63e8f00e 100644 --- a/radiant/brush.h +++ b/radiant/brush.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BRUSH_H ) -#define INCLUDED_BRUSH_H +#pragma once /// \file /// \brief The brush primitive. @@ -4349,6 +4348,3 @@ inline const Functor& Scene_ForEachSelectedBrushFace( scene::Graph& graph, const g_SelectedFaceInstances.foreach( FaceVisitorWrapper( functor ) ); return functor; } - - -#endif diff --git a/radiant/brush_primit.h b/radiant/brush_primit.h index e5ba745d..1f94cd6d 100644 --- a/radiant/brush_primit.h +++ b/radiant/brush_primit.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BRUSH_PRIMIT_H ) -#define INCLUDED_BRUSH_PRIMIT_H +#pragma once #include "math/vector.h" #include "itexdef.h" @@ -183,5 +182,3 @@ inline void ComputeAxisBase( const BasicVector3& normal, BasicVector3 #include "string/stringfwd.h" @@ -93,5 +92,3 @@ extern Callback g_texture_lock_status_changed; void BrushFilters_construct(); void Brush_registerCommands(); - -#endif diff --git a/radiant/brushmodule.h b/radiant/brushmodule.h index 1fc04d61..39dec7f5 100644 --- a/radiant/brushmodule.h +++ b/radiant/brushmodule.h @@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BRUSHMODULE_H ) -#define INCLUDED_BRUSHMODULE_H +#pragma once #include "ibrush.h" void Brush_clipperColourChanged(); void Brush_unlatchPreferences(); - -#endif diff --git a/radiant/brushnode.h b/radiant/brushnode.h index 4efcb0d4..2973f583 100644 --- a/radiant/brushnode.h +++ b/radiant/brushnode.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BRUSHNODE_H ) -#define INCLUDED_BRUSHNODE_H +#pragma once #include "instancelib.h" #include "brush.h" @@ -142,5 +141,3 @@ public: inline Brush* Node_getBrush( scene::Node& node ){ return NodeTypeCast::cast( node ); } - -#endif diff --git a/radiant/brushtokens.h b/radiant/brushtokens.h index 89b8508f..f4267096 100644 --- a/radiant/brushtokens.h +++ b/radiant/brushtokens.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BRUSHTOKENS_H ) -#define INCLUDED_BRUSHTOKENS_H +#pragma once #include "stringio.h" #include "stream/stringstream.h" @@ -656,6 +655,3 @@ public: writer.nextLine(); } }; - - -#endif diff --git a/radiant/brushxml.h b/radiant/brushxml.h index 39d62773..11be5b49 100644 --- a/radiant/brushxml.h +++ b/radiant/brushxml.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BRUSHXML_H ) -#define INCLUDED_BRUSHXML_H +#pragma once #include "stream/stringstream.h" #include "xml/xmlelement.h" @@ -418,6 +417,3 @@ public: importer.popElement( brushElement.name() ); } }; - - -#endif diff --git a/radiant/build.h b/radiant/build.h index 55d94e71..7f0fe073 100644 --- a/radiant/build.h +++ b/radiant/build.h @@ -18,8 +18,7 @@ along with GtkRadiant; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BUILD_H ) -#define INCLUDED_BUILD_H +#pragma once void build_set_variable( const char* name, const char* value ); void build_clear_variables(); @@ -41,5 +40,3 @@ void Build_constructMenu( GtkMenu* menu ); extern GtkMenu* g_bsp_menu; void Build_runRecentExecutedBuild(); - -#endif diff --git a/radiant/camwindow.h b/radiant/camwindow.h index 609f67c3..4ff2ebe4 100644 --- a/radiant/camwindow.h +++ b/radiant/camwindow.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CAMWINDOW_H ) -#define INCLUDED_CAMWINDOW_H +#pragma once #include "math/vector.h" #include "signal/signalfwd.h" @@ -89,5 +88,3 @@ void CamWnd_reconstructStatic(); void CamWnd_Construct(); void CamWnd_Destroy(); - -#endif diff --git a/radiant/clippertool.h b/radiant/clippertool.h index 68283bf4..c96d2f09 100644 --- a/radiant/clippertool.h +++ b/radiant/clippertool.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CLIPPERTOOL_H ) -#define INCLUDED_CLIPPERTOOL_H +#pragma once #include "generic/vector.h" @@ -56,5 +55,3 @@ bool Clipper_get2pointsIn2d(); void ClipperModeQuick(); void Clipper_tryDoubleclick(); void Clipper_tryDoubleclickedCut(); - -#endif diff --git a/radiant/commands.h b/radiant/commands.h index 6acf00eb..a545be0d 100644 --- a/radiant/commands.h +++ b/radiant/commands.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_COMMANDS_H ) -#define INCLUDED_COMMANDS_H +#pragma once #include "gtkutil/accelerator.h" @@ -43,6 +42,3 @@ void DoCommandListDlg(); void LoadCommandMap( const char* path ); void SaveCommandMap( const char* path ); - - -#endif diff --git a/radiant/console.h b/radiant/console.h index 0323f4e8..11ef4aef 100644 --- a/radiant/console.h +++ b/radiant/console.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONSOLE_H ) -#define INCLUDED_CONSOLE_H +#pragma once #include @@ -43,6 +42,3 @@ GtkWidget* Console_constructWindow( GtkWindow* toplevel ); // will open/close the log file based on the parameter void Sys_LogFile( bool enable ); extern bool g_Console_enableLogging; - - -#endif diff --git a/radiant/csg.h b/radiant/csg.h index 99e6ae30..55a369e6 100644 --- a/radiant/csg.h +++ b/radiant/csg.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CSG_H ) -#define INCLUDED_CSG_H +#pragma once void CSG_MakeRoom(); void CSG_Subtract(); @@ -38,5 +37,3 @@ class ClipperPoints; void Scene_BrushSetClipPlane( scene::Graph& graph, const ClipperPoints& points, bool flip ); void Scene_BrushSplitByPlane( scene::Graph& graph, const ClipperPoints& points, bool flip, bool caulk, bool split ); - -#endif diff --git a/radiant/dialog.h b/radiant/dialog.h index 6284c8f5..9c05e994 100644 --- a/radiant/dialog.h +++ b/radiant/dialog.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_DIALOG_H ) -#define INCLUDED_DIALOG_H +#pragma once #include @@ -196,5 +195,3 @@ protected: void AddDialogData( GtkAdjustment& object, float& data ); void AddDialogData( GtkComboBox& object, int& data ); }; - -#endif diff --git a/radiant/eclass.h b/radiant/eclass.h index d4bfd1f9..a0f829b4 100644 --- a/radiant/eclass.h +++ b/radiant/eclass.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ECLASS_H ) -#define INCLUDED_ECLASS_H - -#endif +#pragma once diff --git a/radiant/eclass_def.h b/radiant/eclass_def.h index 102fe4fa..a0f829b4 100644 --- a/radiant/eclass_def.h +++ b/radiant/eclass_def.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ECLASS_DEF_H ) -#define INCLUDED_ECLASS_DEF_H - -#endif +#pragma once diff --git a/radiant/eclass_doom3.h b/radiant/eclass_doom3.h index 9dcd8bbf..bb3d2bdd 100644 --- a/radiant/eclass_doom3.h +++ b/radiant/eclass_doom3.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ECLASS_DOOM3_H ) -#define INCLUDED_ECLASS_DOOM3_H - -#endif +#pragma once diff --git a/radiant/eclass_fgd.h b/radiant/eclass_fgd.h index 9eafc540..bb3d2bdd 100644 --- a/radiant/eclass_fgd.h +++ b/radiant/eclass_fgd.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ECLASS_FGD_H ) -#define INCLUDED_ECLASS_FGD_H - -#endif +#pragma once diff --git a/radiant/eclass_xml.h b/radiant/eclass_xml.h index 9b6f9dd1..bb3d2bdd 100644 --- a/radiant/eclass_xml.h +++ b/radiant/eclass_xml.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ECLASS_XML_H ) -#define INCLUDED_ECLASS_XML_H - -#endif +#pragma once diff --git a/radiant/entity.h b/radiant/entity.h index 79abdcc4..142e44ea 100644 --- a/radiant/entity.h +++ b/radiant/entity.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ENTITY_H ) -#define INCLUDED_ENTITY_H +#pragma once template class BasicVector3; typedef BasicVector3 Vector3; @@ -41,5 +40,3 @@ void Entity_registerShortcuts(); void Entity_Construct(); void Entity_Destroy(); - -#endif diff --git a/radiant/entityinspector.h b/radiant/entityinspector.h index e63cbde1..c7eb8010 100644 --- a/radiant/entityinspector.h +++ b/radiant/entityinspector.h @@ -19,13 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ENTITYINSPECTOR_H ) -#define INCLUDED_ENTITYINSPECTOR_H +#pragma once typedef struct _GtkWidget GtkWidget; typedef struct _GtkWindow GtkWindow; GtkWidget* EntityInspector_constructWindow( GtkWindow* parent ); void EntityInspector_construct(); void EntityInspector_destroy(); - -#endif diff --git a/radiant/entitylist.h b/radiant/entitylist.h index e29f1b9a..629dafdd 100644 --- a/radiant/entitylist.h +++ b/radiant/entitylist.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ENTITYLIST_H ) -#define INCLUDED_ENTITYLIST_H +#pragma once void EntityList_Construct(); void EntityList_Destroy(); @@ -29,5 +28,3 @@ typedef struct _GtkWindow GtkWindow; void EntityList_constructWindow( GtkWindow* main_window ); void EntityList_destroyWindow(); void EntityList_toggleShown(); - -#endif diff --git a/radiant/environment.h b/radiant/environment.h index 467dee36..ec51f550 100644 --- a/radiant/environment.h +++ b/radiant/environment.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ENVIRONMENT_H ) -#define INCLUDED_ENVIRONMENT_H +#pragma once void environment_init( int argc, char* argv[] ); const char* environment_get_home_path(); @@ -32,5 +31,3 @@ extern const char** g_argv; #include "string/stringfwd.h" extern CopiedString g_openMapByCmd; - -#endif diff --git a/radiant/error.h b/radiant/error.h index 833908b5..32c76726 100644 --- a/radiant/error.h +++ b/radiant/error.h @@ -19,9 +19,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_ERROR_H ) -#define INCLUDED_ERROR_H +#pragma once void Error( const char *error, ... ); - -#endif diff --git a/radiant/feedback.h b/radiant/feedback.h index bd849b70..36c4242a 100644 --- a/radiant/feedback.h +++ b/radiant/feedback.h @@ -25,8 +25,7 @@ // classes used for describing geometry information from q3map feedback // -#ifndef __Q3MAP_FEEDBACK__ -#define __Q3MAP_FEEDBACK__ +#pragma once #include "math/vector.h" #include "stream/stringstream.h" @@ -204,5 +203,3 @@ protected: extern CDbgDlg g_DbgDlg; void Feedback_draw2D( VIEWTYPE viewType ); - -#endif diff --git a/radiant/filetypes.h b/radiant/filetypes.h index 9e92118a..d410d299 100644 --- a/radiant/filetypes.h +++ b/radiant/filetypes.h @@ -19,11 +19,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_FILETYPES_H ) -#define INCLUDED_FILETYPES_H +#pragma once class IFileTypeRegistry; IFileTypeRegistry* GetFileTypeRegistry(); const char* findModuleName( IFileTypeRegistry* registry, const char* moduleType, const char* extension ); - -#endif diff --git a/radiant/filterbar.h b/radiant/filterbar.h index 5569ab33..b2dfadd7 100644 --- a/radiant/filterbar.h +++ b/radiant/filterbar.h @@ -1,9 +1,25 @@ -#if !defined( INCLUDED_FILTERBAR_H ) -#define INCLUDED_FILTERBAR_H +/* + Copyright (C) 2001-2006, William Joseph. + All Rights Reserved. + This file is part of GtkRadiant. + GtkRadiant is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + GtkRadiant is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#pragma once //#include "string/string.h" #include "string/stringfwd.h" @@ -15,5 +31,3 @@ GtkToolbar* create_filter_toolbar(); CopiedString GetCommonShader( const char* name ); const char* GetCaulkShader(); - -#endif diff --git a/radiant/filters.h b/radiant/filters.h index 97766ab8..9006c6ca 100644 --- a/radiant/filters.h +++ b/radiant/filters.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_FILTERS_H ) -#define INCLUDED_FILTERS_H +#pragma once typedef struct _GtkMenu GtkMenu; void Filters_constructMenu( GtkMenu* menu_in_menu ); - -#endif diff --git a/radiant/findtexturedialog.h b/radiant/findtexturedialog.h index 2bf06dbb..9c9e6a90 100644 --- a/radiant/findtexturedialog.h +++ b/radiant/findtexturedialog.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_FINDTEXTUREDIALOG_H ) -#define INCLUDED_FINDTEXTUREDIALOG_H +#pragma once void FindTextureDialog_Construct(); void FindTextureDialog_Destroy(); @@ -30,5 +29,3 @@ void FindTextureDialog_constructWindow( GtkWindow* main_window ); void FindTextureDialog_destroyWindow(); bool FindTextureDialog_isOpen(); void FindTextureDialog_selectTexture( const char* name ); - -#endif diff --git a/radiant/glwidget.h b/radiant/glwidget.h index 0adad268..bb3d2bdd 100644 --- a/radiant/glwidget.h +++ b/radiant/glwidget.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GLWIDGET_H ) -#define INCLUDED_GLWIDGET_H - -#endif +#pragma once diff --git a/radiant/grid.h b/radiant/grid.h index b1ccb433..acc8408d 100644 --- a/radiant/grid.h +++ b/radiant/grid.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GRID_H ) -#define INCLUDED_GRID_H +#pragma once #include "signal/signalfwd.h" @@ -40,5 +39,3 @@ void Grid_registerShortcuts(); void Grid_construct(); void Grid_destroy(); - -#endif diff --git a/radiant/groupdialog.h b/radiant/groupdialog.h index 6c259f70..010738b0 100644 --- a/radiant/groupdialog.h +++ b/radiant/groupdialog.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_GROUPDIALOG_H ) -#define INCLUDED_GROUPDIALOG_H +#pragma once #include "generic/callback.h" @@ -43,5 +42,3 @@ GtkWidget* GroupDialog_addPage( const char* tabLabel, GtkWidget* widget, const S void GroupDialog_showPage( GtkWidget* page ); void GroupDialog_updatePageTitle( GtkWidget* page ); - -#endif diff --git a/radiant/gtkdlgs.h b/radiant/gtkdlgs.h index 8582e6ff..0ea42b56 100644 --- a/radiant/gtkdlgs.h +++ b/radiant/gtkdlgs.h @@ -28,8 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined( INCLUDED_GTKDLGS_H ) -#define INCLUDED_GTKDLGS_H +#pragma once #include "qerplugin.h" #include "string/string.h" @@ -49,6 +48,3 @@ void DoAbout(); #include "string/stringfwd.h" extern CopiedString g_TextEditor_editorCommand; - - -#endif diff --git a/radiant/gtkmisc.h b/radiant/gtkmisc.h index 639b7723..1d32e648 100644 --- a/radiant/gtkmisc.h +++ b/radiant/gtkmisc.h @@ -28,8 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined( INCLUDED_GTKMISC_H ) -#define INCLUDED_GTKMISC_H +#pragma once void process_gui(); @@ -67,5 +66,3 @@ bool OpenGLFont_dialog( GtkWidget *parent, const char* font, CopiedString &newfo typedef struct _GtkEntry GtkEntry; void button_clicked_entry_browse_file( GtkWidget* widget, GtkEntry* entry ); void button_clicked_entry_browse_directory( GtkWidget* widget, GtkEntry* entry ); - -#endif diff --git a/radiant/gtktheme.h b/radiant/gtktheme.h index 79425947..1da9a4e2 100644 --- a/radiant/gtktheme.h +++ b/radiant/gtktheme.h @@ -6,9 +6,6 @@ email : ashaduri '@' gmail.com ***************************************************************************/ -#ifndef _GTKTHEME_H_ -#define _GTKTHEME_H_ +#pragma once void gtkThemeDlg(); - -#endif diff --git a/radiant/help.h b/radiant/help.h index d7e6263c..735f2ff3 100644 --- a/radiant/help.h +++ b/radiant/help.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_HELP_H ) -#define INCLUDED_HELP_H +#pragma once typedef struct _GtkMenu GtkMenu; void create_game_help_menu( GtkMenu *menu ); - -#endif diff --git a/radiant/image.h b/radiant/image.h index fe0c8e6d..e3446f33 100644 --- a/radiant/image.h +++ b/radiant/image.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_IMAGE_H ) -#define INCLUDED_IMAGE_H +#pragma once class Image; Image* QERApp_LoadImage( void* environment, const char* name ); - -#endif diff --git a/radiant/main.h b/radiant/main.h index d87b7a8b..a0f829b4 100644 --- a/radiant/main.h +++ b/radiant/main.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MAIN_H ) -#define INCLUDED_MAIN_H - -#endif +#pragma once diff --git a/radiant/mainframe.h b/radiant/mainframe.h index 90b11540..dd46ba58 100644 --- a/radiant/mainframe.h +++ b/radiant/mainframe.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MAINFRAME_H ) -#define INCLUDED_MAINFRAME_H +#pragma once #include "gtkutil/window.h" #include "gtkutil/idledraw.h" @@ -259,5 +258,3 @@ void XYWindowMouseDown_disconnect( MouseEventHandlerId id ); extern GtkWidget* g_page_entity; void FocusAllViews(); - -#endif diff --git a/radiant/map.h b/radiant/map.h index 369b15c0..e3914d4a 100644 --- a/radiant/map.h +++ b/radiant/map.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MAP_H ) -#define INCLUDED_MAP_H +#pragma once #include "iscenegraph.h" #include "generic/callback.h" @@ -162,5 +161,3 @@ void Map_mergeClonedNames( bool makeUnique = true ); const char* getMapsPath(); - -#endif diff --git a/radiant/modelwindow.h b/radiant/modelwindow.h index 5c7afeee..da388304 100644 --- a/radiant/modelwindow.h +++ b/radiant/modelwindow.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODELWINDOW_H ) -#define INCLUDED_MODELWINDOW_H +#pragma once void ModelBrowser_Construct(); @@ -36,6 +35,3 @@ void ModelBrowser_destroyWindow(); GtkWidget* ModelBrowser_getGLWidget(); void ModelBrowser_flushReferences(); - - -#endif diff --git a/radiant/mru.h b/radiant/mru.h index 273c97f1..12a18a42 100644 --- a/radiant/mru.h +++ b/radiant/mru.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MRU_H ) -#define INCLUDED_MRU_H +#pragma once void MRU_AddFile( const char *str ); @@ -29,5 +28,3 @@ void MRU_constructMenu( GtkMenu* menu ); void MRU_Construct(); void MRU_Destroy(); - -#endif diff --git a/radiant/multimon.h b/radiant/multimon.h index a81220e7..0bc4ef19 100644 --- a/radiant/multimon.h +++ b/radiant/multimon.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MULTIMON_H ) -#define INCLUDED_MULTIMON_H +#pragma once struct WindowPosition; @@ -46,5 +45,3 @@ inline void MultiMon_Construct(){ inline void MultiMon_Destroy(){ } #endif - -#endif diff --git a/radiant/nullmodel.h b/radiant/nullmodel.h index 39f27cba..0d89627d 100644 --- a/radiant/nullmodel.h +++ b/radiant/nullmodel.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_NULLMODEL_H ) -#define INCLUDED_NULLMODEL_H +#pragma once namespace scene { @@ -33,5 +32,3 @@ NodeSmartReference NewNullModel(); void NullModel_construct(); void NullModel_destroy(); - -#endif diff --git a/radiant/parse.h b/radiant/parse.h index bf9f2be1..bb3d2bdd 100644 --- a/radiant/parse.h +++ b/radiant/parse.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PARSE_H ) -#define INCLUDED_PARSE_H - -#endif +#pragma once diff --git a/radiant/patch.h b/radiant/patch.h index 79b977a2..271c3a43 100644 --- a/radiant/patch.h +++ b/radiant/patch.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PATCH_H ) -#define INCLUDED_PATCH_H +#pragma once /// \file /// \brief The patch primitive. @@ -1948,5 +1947,3 @@ template inline void Scene_forEachVisiblePatchInstance( const Functor& functor ){ GlobalSceneGraph().traverse( PatchForEachInstanceWalker( functor ) ); } - -#endif diff --git a/radiant/patchdialog.h b/radiant/patchdialog.h index 1304ccbe..14f56564 100644 --- a/radiant/patchdialog.h +++ b/radiant/patchdialog.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PATCHDIALOG_H ) -#define INCLUDED_PATCHDIALOG_H +#pragma once void PatchInspector_Construct(); void PatchInspector_Destroy(); @@ -38,6 +37,3 @@ class Graph; void Scene_PatchTranslateTexture_Selected( scene::Graph& graph, float s, float t ); void Scene_PatchRotateTexture_Selected( scene::Graph& graph, float angle ); void Scene_PatchScaleTexture_Selected( scene::Graph& graph, float s, float t ); - - -#endif diff --git a/radiant/patchmanip.h b/radiant/patchmanip.h index 1e3a998e..48bbcdce 100644 --- a/radiant/patchmanip.h +++ b/radiant/patchmanip.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_PATCHMANIP_H ) -#define INCLUDED_PATCHMANIP_H +#pragma once #include "string/stringfwd.h" @@ -66,5 +65,3 @@ void Patch_FlipTextureY(); class PatchCreator; extern PatchCreator* g_patchCreator; - -#endif diff --git a/radiant/patchmodule.h b/radiant/patchmodule.h index c97cb7ff..bb3d2bdd 100644 --- a/radiant/patchmodule.h +++ b/radiant/patchmodule.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PATCHMODULE_H ) -#define INCLUDED_PATCHMODULE_H - -#endif +#pragma once diff --git a/radiant/plugin.h b/radiant/plugin.h index 75ab5c4c..4a8d6d6d 100644 --- a/radiant/plugin.h +++ b/radiant/plugin.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGIN_H ) -#define INCLUDED_PLUGIN_H +#pragma once class ModuleServer; bool Radiant_Construct( ModuleServer& server ); @@ -42,6 +41,3 @@ ToolbarModules& Radiant_getToolbarModules(); struct _QERPluginTable; typedef Modules<_QERPluginTable> PluginModules; PluginModules& Radiant_getPluginModules(); - - -#endif diff --git a/radiant/pluginapi.h b/radiant/pluginapi.h index 332e07d0..cb2acd13 100644 --- a/radiant/pluginapi.h +++ b/radiant/pluginapi.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGINAPI_H ) -#define INCLUDED_PLUGINAPI_H +#pragma once template class BasicVector3; typedef BasicVector3 Vector3; @@ -29,5 +28,3 @@ typedef BasicVector3 Vector3; void QERApp_GetCamera( Vector3& origin, Vector3& angles ); void QERApp_SetCamera( const Vector3& origin, const Vector3& angles ); void QERApp_GetCamWindowExtents( int *x, int *y, int *width, int *height ); - -#endif diff --git a/radiant/pluginmanager.h b/radiant/pluginmanager.h index cae30094..f71f9ec1 100644 --- a/radiant/pluginmanager.h +++ b/radiant/pluginmanager.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGINMANAGER_H ) -#define INCLUDED_PLUGINMANAGER_H +#pragma once #include @@ -74,5 +73,3 @@ inline bool plugin_menu_special( const char* text ){ || plugin_submenu_in( text ) || plugin_submenu_out( text ); } - -#endif diff --git a/radiant/pluginmenu.h b/radiant/pluginmenu.h index 254db777..fdc1882c 100644 --- a/radiant/pluginmenu.h +++ b/radiant/pluginmenu.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGINMENU_H ) -#define INCLUDED_PLUGINMENU_H +#pragma once typedef struct _GtkMenuItem GtkMenuItem; GtkMenuItem* create_plugins_menu(); @@ -29,5 +28,3 @@ typedef struct _GtkMenu GtkMenu; typedef struct _GtkMenuItem GtkMenuItem; void PluginsMenu_populate(); void PluginsMenu_clear(); - -#endif diff --git a/radiant/plugintoolbar.h b/radiant/plugintoolbar.h index 7621cfd2..22384741 100644 --- a/radiant/plugintoolbar.h +++ b/radiant/plugintoolbar.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PLUGINTOOLBAR_H ) -#define INCLUDED_PLUGINTOOLBAR_H +#pragma once typedef struct _GtkToolbar GtkToolbar; GtkToolbar* create_plugin_toolbar(); @@ -29,5 +28,3 @@ void PluginToolbar_clear(); typedef struct _GtkImage GtkImage; GtkImage* new_plugin_image( const char* filename ); // filename is relative to plugin bitmaps path - -#endif diff --git a/radiant/points.h b/radiant/points.h index bd970e6e..769a77ab 100644 --- a/radiant/points.h +++ b/radiant/points.h @@ -25,8 +25,7 @@ // header for Pointfile stuff (adding a C++ class to wrap the pointfile thing in the SAX parser) // -#if !defined( INCLUDED_POINTS_H ) -#define INCLUDED_POINTS_H +#pragma once void Pointfile_Clear(); void Pointfile_Delete( void ); @@ -36,5 +35,3 @@ void Pointfile_Destroy(); class ISAXHandler; extern ISAXHandler& g_pointfile; - -#endif diff --git a/radiant/preferencedictionary.h b/radiant/preferencedictionary.h index 62d2c442..1c14a998 100644 --- a/radiant/preferencedictionary.h +++ b/radiant/preferencedictionary.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_PREFERENCEDICTIONARY_H ) -#define INCLUDED_PREFERENCEDICTIONARY_H +#pragma once #include "preferencesystem.h" #include "xml/ixml.h" @@ -260,5 +259,3 @@ public: return m_xml_stack.back().m_ostream.write( buffer, length ); } }; - -#endif diff --git a/radiant/preferences.h b/radiant/preferences.h index 7be2ca6c..6ea9b828 100644 --- a/radiant/preferences.h +++ b/radiant/preferences.h @@ -26,8 +26,7 @@ please contact Id Software immediately at info@idsoftware.com. */ -#if !defined( INCLUDED_PREFERENCES_H ) -#define INCLUDED_PREFERENCES_H +#pragma once #include "libxml/parser.h" #include "dialog.h" @@ -409,6 +408,3 @@ void Preferences_Load(); void Preferences_Save(); void Preferences_Reset(); - - -#endif diff --git a/radiant/qe3.h b/radiant/qe3.h index 05d63d52..6f15163b 100644 --- a/radiant/qe3.h +++ b/radiant/qe3.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_QE3_H ) -#define INCLUDED_QE3_H +#pragma once #include "string/string.h" @@ -63,5 +62,3 @@ extern SimpleCounter g_patchCount; extern SimpleCounter g_entityCount; void bsp_init(); - -#endif diff --git a/radiant/qgl.h b/radiant/qgl.h index f7ef8a22..6c36c13a 100644 --- a/radiant/qgl.h +++ b/radiant/qgl.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_QGL_H ) -#define INCLUDED_QGL_H +#pragma once struct OpenGLBinding; void QGL_sharedContextCreated( OpenGLBinding& table ); @@ -29,5 +28,3 @@ void QGL_sharedContextDestroyed( OpenGLBinding& table ); bool QGL_ExtensionSupported( const char* extension ); float QGL_maxTextureAnisotropy(); - -#endif diff --git a/radiant/referencecache.h b/radiant/referencecache.h index eac4fc7c..75c297d0 100644 --- a/radiant/referencecache.h +++ b/radiant/referencecache.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_REFERENCECACHE_H ) -#define INCLUDED_REFERENCECACHE_H +#pragma once /// \brief Saves all open resource references if they differ from the version on disk. void SaveReferences(); @@ -38,5 +37,3 @@ class MapFormat; typedef void ( *GraphTraversalFunc )( scene::Node& root, const scene::Traversable::Walker& walker ); bool MapResource_saveFile( const MapFormat& format, scene::Node& root, GraphTraversalFunc traverse, const char* filename ); - -#endif diff --git a/radiant/renderer.h b/radiant/renderer.h index 55ab02eb..ed72c9c6 100644 --- a/radiant/renderer.h +++ b/radiant/renderer.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_RENDERER_H ) -#define INCLUDED_RENDERER_H +#pragma once #include "irender.h" #include "renderable.h" @@ -170,5 +169,3 @@ inline void Scene_Render( Renderer& renderer, const VolumeTest& volume ){ GlobalSceneGraph().traverse( ForEachVisible( volume, RenderHighlighted( renderer, volume ) ) ); GlobalShaderCache().forEachRenderable( RenderHighlighted::RenderCaller( RenderHighlighted( renderer, volume ) ) ); } - -#endif diff --git a/radiant/renderstate.h b/radiant/renderstate.h index 26707d93..4e974ddb 100644 --- a/radiant/renderstate.h +++ b/radiant/renderstate.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_RENDERSTATE_H ) -#define INCLUDED_RENDERSTATE_H +#pragma once void ShaderCache_setBumpEnabled( bool enabled ); void ShaderCache_extensionsInitialised(); - -#endif diff --git a/radiant/scenegraph.h b/radiant/scenegraph.h index 759c34c0..bb3d2bdd 100644 --- a/radiant/scenegraph.h +++ b/radiant/scenegraph.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SCENEGRAPH_H ) -#define INCLUDED_SCENEGRAPH_H - -#endif +#pragma once diff --git a/radiant/select.h b/radiant/select.h index d49b84f9..34704b0f 100644 --- a/radiant/select.h +++ b/radiant/select.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SELECT_H ) -#define INCLUDED_SELECT_H +#pragma once #include "math/vector.h" @@ -89,5 +88,3 @@ struct select_workzone_t }; const select_workzone_t& Select_getWorkZone(); - -#endif diff --git a/radiant/selection.h b/radiant/selection.h index d26ea618..b26a0cfc 100644 --- a/radiant/selection.h +++ b/radiant/selection.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SELECTION_H ) -#define INCLUDED_SELECTION_H +#pragma once #include "windowobserver.h" #include "generic/callbackfwd.h" @@ -44,5 +43,3 @@ template class BasicVector3; typedef BasicVector3 Vector3; void Scene_Intersect( const View& view, const float device_point[2], const float device_epsilon[2], Vector3& intersection ); - -#endif diff --git a/radiant/server.h b/radiant/server.h index 2e29a804..e1d4e8b1 100644 --- a/radiant/server.h +++ b/radiant/server.h @@ -19,13 +19,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SERVER_H ) -#define INCLUDED_SERVER_H +#pragma once class ModuleServer; ModuleServer& GlobalModuleServer_get(); void GlobalModuleServer_loadModule( const char* filename ); void GlobalModuleServer_Initialise(); void GlobalModuleServer_Shutdown(); - -#endif diff --git a/radiant/sockets.h b/radiant/sockets.h index 434a3699..fa0c5a75 100644 --- a/radiant/sockets.h +++ b/radiant/sockets.h @@ -1,6 +1,5 @@ -#if !defined( INCLUDED_SOCKETS_H ) -#define INCLUDED_SOCKETS_H +#pragma once #include "l_net/l_net.h" @@ -10,5 +9,3 @@ // 0: timeout // 1: ready int Net_Wait( socket_t *sock, long sec, long usec ); - -#endif diff --git a/radiant/stacktrace.h b/radiant/stacktrace.h index ddbe3a71..430980aa 100644 --- a/radiant/stacktrace.h +++ b/radiant/stacktrace.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_STACKTRACE_H ) -#define INCLUDED_STACKTRACE_H +#pragma once class TextOutputStream; void write_stack_trace( TextOutputStream& outputStream ); - -#endif diff --git a/radiant/surfacedialog.h b/radiant/surfacedialog.h index 0e0ed24a..30925019 100644 --- a/radiant/surfacedialog.h +++ b/radiant/surfacedialog.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_SURFACEDIALOG_H ) -#define INCLUDED_SURFACEDIALOG_H +#pragma once void SurfaceInspector_Construct(); @@ -55,5 +54,3 @@ struct si_globals_t } }; extern si_globals_t g_si_globals; - -#endif diff --git a/radiant/texmanip.h b/radiant/texmanip.h index 34434141..642eda2f 100644 --- a/radiant/texmanip.h +++ b/radiant/texmanip.h @@ -29,12 +29,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined( INCLUDED_TEXMANIP_H ) -#define INCLUDED_TEXMANIP_H +#pragma once typedef unsigned char byte; void R_ResampleTexture( const void *indata, int inwidth, int inheight, void *outdata, int outwidth, int outheight, int bytesperpixel ); void GL_MipReduce( byte *in, byte *out, int width, int height, int destwidth, int destheight ); - -#endif diff --git a/radiant/textureentry.h b/radiant/textureentry.h index 1deccd70..e5da3d71 100644 --- a/radiant/textureentry.h +++ b/radiant/textureentry.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_TEXTUREENTRY_H ) -#define INCLUDED_TEXTUREENTRY_H +#pragma once #include @@ -140,6 +139,3 @@ public: }; typedef Static< EntryCompletion > GlobalShaderEntryCompletion; - - -#endif diff --git a/radiant/textures.h b/radiant/textures.h index 297ebc99..f9b64860 100644 --- a/radiant/textures.h +++ b/radiant/textures.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_TEXTURES_H ) -#define INCLUDED_TEXTURES_H +#pragma once #include "generic/callbackfwd.h" @@ -29,5 +28,3 @@ void Textures_Unrealise(); void Textures_sharedContextDestroyed(); void Textures_setModeChangedNotify( const Callback& notify ); - -#endif diff --git a/radiant/texwindow.h b/radiant/texwindow.h index a9c3d014..d46052c4 100644 --- a/radiant/texwindow.h +++ b/radiant/texwindow.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_TEXWINDOW_H ) -#define INCLUDED_TEXWINDOW_H +#pragma once #include "generic/callbackfwd.h" #include "signal/signalfwd.h" @@ -60,5 +59,3 @@ void TextureBrowser_addActiveShadersChangedCallback( const SignalHandler& handle void TextureBrowser_addShadersRealiseCallback( const SignalHandler& handler ); GtkWidget* TextureBrowser_getGLWidget(); - -#endif diff --git a/radiant/timer.h b/radiant/timer.h index 919160f6..2d4d3c0e 100644 --- a/radiant/timer.h +++ b/radiant/timer.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined ( INCLUDED_TIMER_H ) -#define INCLUDED_TIMER_H +#pragma once #if 1 @@ -89,5 +88,3 @@ public: return MillisecondTime::current().milliseconds_since( m_start ); } }; - -#endif diff --git a/radiant/treemodel.h b/radiant/treemodel.h index 5e8b58b5..3f12bbcb 100644 --- a/radiant/treemodel.h +++ b/radiant/treemodel.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_TREEMODEL_H ) -#define INCLUDED_TREEMODEL_H +#pragma once struct GraphTreeModel; @@ -33,5 +32,3 @@ class Instance; } void graph_tree_model_insert( GraphTreeModel* model, const scene::Instance& instance ); void graph_tree_model_erase( GraphTreeModel* model, const scene::Instance& instance ); - -#endif diff --git a/radiant/undo.h b/radiant/undo.h index 89e6337d..bb3d2bdd 100644 --- a/radiant/undo.h +++ b/radiant/undo.h @@ -19,7 +19,4 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_UNDO_H ) -#define INCLUDED_UNDO_H - -#endif +#pragma once diff --git a/radiant/url.h b/radiant/url.h index 726be705..f72ca92d 100644 --- a/radiant/url.h +++ b/radiant/url.h @@ -19,9 +19,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_URL_H ) -#define INCLUDED_URL_H +#pragma once void OpenURL( const char *url ); - -#endif diff --git a/radiant/view.h b/radiant/view.h index 35303f8b..79e6c35b 100644 --- a/radiant/view.h +++ b/radiant/view.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_VIEW_H ) -#define INCLUDED_VIEW_H +#pragma once #include "cullable.h" #include "math/frustum.h" @@ -196,5 +195,3 @@ public: return m_frustum; } }; - -#endif diff --git a/radiant/watchbsp.h b/radiant/watchbsp.h index 49b35204..3976c2a8 100644 --- a/radiant/watchbsp.h +++ b/radiant/watchbsp.h @@ -28,8 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined( INCLUDED_WATCHBSP_H ) -#define INCLUDED_WATCHBSP_H +#pragma once void BuildMonitor_Construct(); void BuildMonitor_Destroy(); @@ -40,5 +39,3 @@ void BuildMonitor_Run( GPtrArray* commands, const char* mapName ); extern bool g_WatchBSP_Enabled; extern bool g_WatchBSP_LeakStop; extern bool g_WatchBSP0_DumpLog; - -#endif diff --git a/radiant/winding.h b/radiant/winding.h index 4c8db13c..102470ae 100644 --- a/radiant/winding.h +++ b/radiant/winding.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_WINDING_H ) -#define INCLUDED_WINDING_H +#pragma once #include "debugging/debugging.h" @@ -276,5 +275,3 @@ inline void Winding_printConnectivity( Winding& winding ){ globalOutputStream() << "vertex: " << Unsigned( vertexIndex ) << " adjacent: " << Unsigned( ( *i ).adjacent ) << "\n"; } } - -#endif diff --git a/radiant/windowobservers.h b/radiant/windowobservers.h index 7b7a79d4..5991e28e 100644 --- a/radiant/windowobservers.h +++ b/radiant/windowobservers.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_WINDOWOBSERVERS_H ) -#define INCLUDED_WINDOWOBSERVERS_H +#pragma once #include "windowobserver.h" @@ -61,5 +60,3 @@ inline ModifierFlags modifiers_for_state( unsigned int state ){ } return modifiers; } - -#endif diff --git a/radiant/xmlstuff.h b/radiant/xmlstuff.h index 1b362169..6c1428f8 100644 --- a/radiant/xmlstuff.h +++ b/radiant/xmlstuff.h @@ -34,8 +34,7 @@ // header for xml stuff used in radiant // -#ifndef __XMLSTUFF__ -#define __XMLSTUFF__ +#pragma once #include "libxml/parser.h" @@ -82,5 +81,3 @@ public: virtual void DropHighlight(){ } }; - -#endif diff --git a/radiant/xywindow.h b/radiant/xywindow.h index 4422c074..e08a899d 100644 --- a/radiant/xywindow.h +++ b/radiant/xywindow.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_XYWINDOW_H ) -#define INCLUDED_XYWINDOW_H +#pragma once #include "math/matrix.h" #include "signal/signal.h" @@ -317,5 +316,3 @@ void WXY_SetBackgroundImage(); void XYShow_registerCommands(); void XYWnd_registerShortcuts(); - -#endif diff --git a/tools/quake3/common/bitflags.h b/tools/quake3/common/bitflags.h index 5862c8e3..b3176e1d 100644 --- a/tools/quake3/common/bitflags.h +++ b/tools/quake3/common/bitflags.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_BITFLAGS_H ) -#define INCLUDED_BITFLAGS_H +#pragma once #include @@ -80,5 +79,3 @@ public: private: T flags_ = 0; }; - -#endif diff --git a/tools/quake3/common/imagelib.h b/tools/quake3/common/imagelib.h index 0169f06d..9eed70f1 100644 --- a/tools/quake3/common/imagelib.h +++ b/tools/quake3/common/imagelib.h @@ -21,6 +21,7 @@ // piclib.h +#pragma once void LoadLBM( const char *filename, byte **picture, byte **palette ); void WriteLBMfile( const char *filename, byte *data, int width, int height diff --git a/tools/quake3/common/md4.h b/tools/quake3/common/md4.h index 29845a33..8b3db290 100644 --- a/tools/quake3/common/md4.h +++ b/tools/quake3/common/md4.h @@ -25,8 +25,7 @@ Boston, MA 02111-1307, USA */ -#ifndef _MDFOUR_H -#define _MDFOUR_H +#pragma once #include @@ -42,5 +41,3 @@ void mdfour( unsigned char *out, unsigned char *in, int n ); unsigned Com_BlockChecksum( void *buffer, int length ); void Com_BlockFullChecksum( void *buffer, int len, unsigned char *outbuf ); - -#endif // _MDFOUR_H diff --git a/tools/quake3/common/mutex.h b/tools/quake3/common/mutex.h index ca8da18d..02accac6 100644 --- a/tools/quake3/common/mutex.h +++ b/tools/quake3/common/mutex.h @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#pragma once typedef void *mutex_t; diff --git a/tools/quake3/common/qthreads.h b/tools/quake3/common/qthreads.h index 8339cae9..e4125f6d 100644 --- a/tools/quake3/common/qthreads.h +++ b/tools/quake3/common/qthreads.h @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#pragma once extern int numthreads; diff --git a/tools/quake3/common/unzip.h b/tools/quake3/common/unzip.h index 00af867e..2f2df609 100644 --- a/tools/quake3/common/unzip.h +++ b/tools/quake3/common/unzip.h @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#pragma once #if defined( STRICTUNZIP ) || defined( STRICTZIPUNZIP ) /* like the STRICT of WIN32, we define a pointer that cannot be converted diff --git a/tools/quake3/q3map2/convert_obj.h b/tools/quake3/q3map2/convert_obj.h index 73c811ef..3b6a0940 100644 --- a/tools/quake3/q3map2/convert_obj.h +++ b/tools/quake3/q3map2/convert_obj.h @@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_CONVERT_OBJ_H ) -#define INCLUDED_CONVERT_OBJ_H +#pragma once int Convert_CountLightmaps( const char* dirname ); void Convert_ReferenceLightmaps( const char* base, std::vector& lmIndices ); - -#endif diff --git a/tools/quake3/q3map2/model.h b/tools/quake3/q3map2/model.h index 3cd3ebab..ff3186b9 100644 --- a/tools/quake3/q3map2/model.h +++ b/tools/quake3/q3map2/model.h @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined( INCLUDED_MODEL_H ) -#define INCLUDED_MODEL_H +#pragma once #include #include @@ -34,5 +33,3 @@ public: }; std::vector LoadModelWalker( const char *name, int frame ); - -#endif diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 5e92d064..4d8bc09b 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -27,11 +27,7 @@ ------------------------------------------------------------------------------- */ - -/* marker */ -#ifndef Q3MAP2_H -#define Q3MAP2_H - +#pragma once /* version */ @@ -2400,6 +2396,3 @@ Q_EXTERN std::vector bspAds; #define Image_LinearFloatFromsRGBFloat( c ) ( ( ( c ) <= 0.04045f ) ? ( c ) * ( 1.0f / 12.92f ) : (float)pow( ( ( c ) + 0.055f ) * ( 1.0f / 1.055f ), 2.4f ) ) #define Image_sRGBFloatFromLinearFloat( c ) ( ( ( c ) < 0.0031308f ) ? ( c ) * 12.92f : 1.055f * (float)pow( ( c ), 1.0f / 2.4f ) - 0.055f ) - -/* end marker */ -#endif