1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-22 17:47:38 +08:00

Allow compilation on gcc/clang without -Wno-unknown-pragmas.

This commit is contained in:
Nicholas Hastings 2013-10-06 13:46:15 -04:00
parent 34d4b05185
commit 9889382863
67 changed files with 218 additions and 17 deletions

View File

@ -22,9 +22,11 @@
#define ALIGN64( a ) a = (byte *)((int)((byte *)a + 63) & ~ 63) #define ALIGN64( a ) a = (byte *)((int)((byte *)a + 63) & ~ 63)
// Fixup macros create variables that may not be referenced // Fixup macros create variables that may not be referenced
#ifdef _WIN32
#pragma warning( push ) #pragma warning( push )
#pragma warning( disable:4189 ) // local variable is initialized but not referenced #pragma warning( disable:4189 ) // local variable is initialized but not referenced
#pragma warning( disable:4366 ) // The result of the unary '&' operator may be unaligned #pragma warning( disable:4366 ) // The result of the unary '&' operator may be unaligned
#endif
namespace StudioByteSwap namespace StudioByteSwap
{ {
@ -2433,7 +2435,9 @@ void ProcessMDLFields( void *pDataBase, datadescProcessFunc_t pfnProcessFunc )
} }
#ifdef _WIN32
#pragma warning( pop ) // local variable is initialized but not referenced #pragma warning( pop ) // local variable is initialized but not referenced
#endif
} // namespace StudioByteSwap } // namespace StudioByteSwap

View File

@ -16,7 +16,9 @@
// memdbgon must be the last include file in a .cpp file!!! // memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning(disable:4244) #pragma warning(disable:4244)
#endif
const int MAX_ERRORS = 5; const int MAX_ERRORS = 5;

View File

@ -20,7 +20,9 @@ public:
EXPOSE_INTERFACE( CAnimatedTextureProxy, IMaterialProxy, "AnimatedTexture" IMATERIAL_PROXY_INTERFACE_VERSION ); EXPOSE_INTERFACE( CAnimatedTextureProxy, IMaterialProxy, "AnimatedTexture" IMATERIAL_PROXY_INTERFACE_VERSION );
#ifdef _WIN32
#pragma warning (disable : 4100) #pragma warning (disable : 4100)
#endif
float CAnimatedTextureProxy::GetAnimationStartTime( void* pBaseEntity ) float CAnimatedTextureProxy::GetAnimationStartTime( void* pBaseEntity )
{ {

View File

@ -13,7 +13,9 @@
class IMaterial; class IMaterial;
class IMaterialVar; class IMaterialVar;
#ifdef _WIN32
#pragma warning (disable : 4100) #pragma warning (disable : 4100)
#endif
class CBaseAnimatedTextureProxy : public IMaterialProxy class CBaseAnimatedTextureProxy : public IMaterialProxy
{ {

View File

@ -8,7 +8,9 @@
#include "cbase.h" #include "cbase.h"
// identifier was truncated to '255' characters in the debug information // identifier was truncated to '255' characters in the debug information
#ifdef _WIN32
#pragma warning(disable: 4786) #pragma warning(disable: 4786)
#endif
#include "proxyentity.h" #include "proxyentity.h"
#include "materialsystem/imaterialvar.h" #include "materialsystem/imaterialvar.h"
@ -113,8 +115,9 @@ void CCamoTextureRegen::RegenerateTextureBits( ITexture *pTexture, IVTFTexture *
m_pProxy->GenerateCamoTexture( pTexture, pVTFTexture ); m_pProxy->GenerateCamoTexture( pTexture, pVTFTexture );
} }
#ifdef _WIN32
#pragma warning (disable:4355) #pragma warning (disable:4355)
#endif
CCamoMaterialProxy::CCamoMaterialProxy() : m_TextureRegen(this) CCamoMaterialProxy::CCamoMaterialProxy() : m_TextureRegen(this)
{ {
@ -136,7 +139,9 @@ CCamoMaterialProxy::CCamoMaterialProxy() : m_TextureRegen(this)
m_pEnt = NULL; m_pEnt = NULL;
} }
#ifdef _WIN32
#pragma warning (default:4355) #pragma warning (default:4355)
#endif
CCamoMaterialProxy::~CCamoMaterialProxy() CCamoMaterialProxy::~CCamoMaterialProxy()
{ {

View File

@ -247,13 +247,17 @@ protected:
static CUtlMap<CDetailModel *, LightStyleInfo_t> gm_LightStylesMap; static CUtlMap<CDetailModel *, LightStyleInfo_t> gm_LightStylesMap;
#ifdef _WIN32
#pragma warning( disable : 4201 ) //warning C4201: nonstandard extension used : nameless struct/union #pragma warning( disable : 4201 ) //warning C4201: nonstandard extension used : nameless struct/union
#endif
union union
{ {
model_t* m_pModel; model_t* m_pModel;
SptrintInfo_t m_SpriteInfo; SptrintInfo_t m_SpriteInfo;
}; };
#ifdef _WIN32
#pragma warning( default : 4201 ) #pragma warning( default : 4201 )
#endif
#ifdef USE_DETAIL_SHAPES #ifdef USE_DETAIL_SHAPES
// pointer to advanced properties // pointer to advanced properties

View File

@ -17,7 +17,9 @@
#include "PortalRender.h" #include "PortalRender.h"
#endif #endif
#ifdef _WIN32
#pragma warning( disable: 4355 ) // warning C4355: 'this' : used in base member initializer list #pragma warning( disable: 4355 ) // warning C4355: 'this' : used in base member initializer list
#endif
class CClientTools; class CClientTools;

View File

@ -11,7 +11,9 @@
// $NoKeywords: $ // $NoKeywords: $
//=============================================================================// //=============================================================================//
#ifdef _WIN32
#pragma warning( disable : 4800 ) // disable forcing int to bool performance warning #pragma warning( disable : 4800 ) // disable forcing int to bool performance warning
#endif
#include "cbase.h" #include "cbase.h"
#include <cdll_client_int.h> #include <cdll_client_int.h>

View File

@ -10,8 +10,10 @@
// memdbgon must be the last include file in a .cpp file!!! // memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
// warning C4660: template-class specialization 'CInterpolatedVar<float>' is already instantiated // warning C4660: template-class specialization 'CInterpolatedVar<float>' is already instantiated
#pragma warning( disable : 4660 ) #pragma warning( disable : 4660 )
#endif
template class CInterpolatedVar<float>; template class CInterpolatedVar<float>;
template class CInterpolatedVar<Vector>; template class CInterpolatedVar<Vector>;

View File

@ -13,7 +13,9 @@
#include "cbase.h" #include "cbase.h"
#ifdef _WIN32
#pragma warning( disable : 4800 ) // disable forcing int to bool performance warning #pragma warning( disable : 4800 ) // disable forcing int to bool performance warning
#endif
// VGUI panel includes // VGUI panel includes
#include <vgui_controls/Panel.h> #include <vgui_controls/Panel.h>

View File

@ -13,7 +13,9 @@
class IMaterial; class IMaterial;
class IMaterialVar; class IMaterialVar;
#ifdef _WIN32
#pragma warning (disable : 4100) #pragma warning (disable : 4100)
#endif
class CBaseToggleTextureProxy : public IMaterialProxy class CBaseToggleTextureProxy : public IMaterialProxy
{ {

View File

@ -6,7 +6,10 @@
// $NoKeywords: $ // $NoKeywords: $
//=============================================================================// //=============================================================================//
#include "cbase.h" #include "cbase.h"
#ifdef _WIN32
#pragma warning (disable: 4514) #pragma warning (disable: 4514)
#endif
#include "vgui_bitmapimage.h" #include "vgui_bitmapimage.h"
#include "vgui_bitmapbutton.h" #include "vgui_bitmapbutton.h"

View File

@ -6,7 +6,11 @@
// $NoKeywords: $ // $NoKeywords: $
//=============================================================================// //=============================================================================//
#include "cbase.h" #include "cbase.h"
#ifdef _WIN32
#pragma warning (disable: 4514) #pragma warning (disable: 4514)
#endif
#include "vgui_bitmappanel.h" #include "vgui_bitmappanel.h"
#include <KeyValues.h> #include <KeyValues.h>
#include "panelmetaclassmgr.h" #include "panelmetaclassmgr.h"

View File

@ -15,11 +15,15 @@
#include "networkvar.h" #include "networkvar.h"
#ifdef DEBUG #ifdef DEBUG
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#endif // _WIN32
#include <typeinfo> #include <typeinfo>
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#pragma warning(disable:4290) #pragma warning(disable:4290)
#endif #endif // _WIN32
#endif // DEBUG
#if defined( _WIN32 ) #if defined( _WIN32 )
#pragma once #pragma once

View File

@ -34,8 +34,10 @@ void DebugNoteMovementFailure()
} }
// a place to put breakpoints // a place to put breakpoints
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4189) #pragma warning(disable:4189)
#endif
AIMoveResult_t DbgResult( AIMoveResult_t result ) AIMoveResult_t DbgResult( AIMoveResult_t result )
{ {
if ( result < AIMR_OK ) if ( result < AIMR_OK )

View File

@ -433,8 +433,10 @@ int __cdecl AdvisorStagingComparator(const EHANDLE *pe1, const EHANDLE *pe2)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4706) #pragma warning(disable : 4706)
#endif
void CNPC_Advisor::Activate() void CNPC_Advisor::Activate()
{ {
@ -468,7 +470,9 @@ void CNPC_Advisor::Activate()
AssertMsg(m_hvStagingPositions.Count() > 0, "You did not specify any staging positions in the advisor's staging_ent_names !"); AssertMsg(m_hvStagingPositions.Count() > 0, "You did not specify any staging positions in the advisor's staging_ent_names !");
#endif #endif
} }
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -94,7 +94,9 @@ const char *g_ppszRandomCombineModels[] =
#define HL2MPPLAYER_PHYSDAMAGE_SCALE 4.0f #define HL2MPPLAYER_PHYSDAMAGE_SCALE 4.0f
#ifdef _WIN32
#pragma warning( disable : 4355 ) #pragma warning( disable : 4355 )
#endif
CHL2MP_Player::CHL2MP_Player() : m_PlayerAnimState( this ) CHL2MP_Player::CHL2MP_Player() : m_PlayerAnimState( this )
{ {

View File

@ -18,10 +18,14 @@
#ifndef _XBOX #ifndef _XBOX
#undef min #undef min
#undef max #undef max
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#endif // _WIN32
#include <set> #include <set>
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif #endif // _WIN32
#endif // _XBOX
#ifdef _WIN32 #ifdef _WIN32
#pragma once #pragma once

View File

@ -71,12 +71,16 @@ LINK_ENTITY_TO_CLASS( prop_vehicle, CPropVehicle );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning (disable:4355) #pragma warning (disable:4355)
#endif
CPropVehicle::CPropVehicle() : m_VehiclePhysics( this ) CPropVehicle::CPropVehicle() : m_VehiclePhysics( this )
{ {
SetVehicleType( VEHICLE_TYPE_CAR_WHEELS ); SetVehicleType( VEHICLE_TYPE_CAR_WHEELS );
} }
#ifdef _WIN32
#pragma warning (default:4355) #pragma warning (default:4355)
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:

View File

@ -25,7 +25,10 @@
// memdbgon must be the last include file in a .cpp file!!! // memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning( disable : 4244 ) #pragma warning( disable : 4244 )
#endif
#define iabs(i) (( (i) >= 0 ) ? (i) : -(i) ) #define iabs(i) (( (i) >= 0 ) ? (i) : -(i) )
int ExtractBbox( CStudioHdr *pstudiohdr, int sequence, Vector& mins, Vector& maxs ) int ExtractBbox( CStudioHdr *pstudiohdr, int sequence, Vector& mins, Vector& maxs )

View File

@ -29,7 +29,9 @@
// memdbgon must be the last include file in a .cpp file!!! // memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning( disable : 4127 ) #pragma warning( disable : 4127 )
#endif
// Let scene linger for 1/4 second so blends can finish // Let scene linger for 1/4 second so blends can finish
#define SCENE_LINGER_TIME 0.25f #define SCENE_LINGER_TIME 0.25f

View File

@ -4837,7 +4837,9 @@ void CGameMovement::FullTossMove( void )
// Purpose: TF2 commander mode movement logic // Purpose: TF2 commander mode movement logic
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning (disable : 4701) #pragma warning (disable : 4701)
#endif
void CGameMovement::IsometricMove( void ) void CGameMovement::IsometricMove( void )
{ {
@ -4872,7 +4874,9 @@ void CGameMovement::IsometricMove( void )
mv->m_vecVelocity.Init(); mv->m_vecVelocity.Init();
} }
#ifdef _WIN32
#pragma warning (default : 4701) #pragma warning (default : 4701)
#endif
bool CGameMovement::GameHasLadders() const bool CGameMovement::GameHasLadders() const

View File

@ -16,7 +16,7 @@
// memdbgon must be the last include file in a .cpp file!!! // memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#if !defined(COMPILER_MSVC64) && !defined(LINUX) #if !defined(COMPILER_MSVC64) && !defined(POSIX)
// Implement for 64-bit Windows if needed. // Implement for 64-bit Windows if needed.
// Clang hits "fatal error: error in backend:" and other errors when trying // Clang hits "fatal error: error in backend:" and other errors when trying
// to compile the inline assembly below. 3DNow support is highly unlikely to // to compile the inline assembly below. 3DNow support is highly unlikely to

View File

@ -6,7 +6,10 @@
#include "mathlib/IceKey.H" #include "mathlib/IceKey.H"
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning(disable: 4244) #pragma warning(disable: 4244)
#endif
/* Structure of a single round subkey */ /* Structure of a single round subkey */

View File

@ -106,8 +106,10 @@ ALIGN128 float power2_n[256] = // 2**(index - 128) / 255
// You can use this to double check the exponent table and assert that // You can use this to double check the exponent table and assert that
// the precomputation is correct. // the precomputation is correct.
#ifdef DBGFLAG_ASSERT #ifdef DBGFLAG_ASSERT
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning( disable : 4189 ) // disable unused local variable warning #pragma warning( disable : 4189 ) // disable unused local variable warning
#endif
static void CheckExponentTable() static void CheckExponentTable()
{ {
for( int i = 0; i < 256; i++ ) for( int i = 0; i < 256; i++ )
@ -120,8 +122,10 @@ static void CheckExponentTable()
power2_n[i] == testAgainst ); power2_n[i] == testAgainst );
} }
} }
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif #endif
#endif
void BuildGammaTable( float gamma, float texGamma, float brightness, int overbright ) void BuildGammaTable( float gamma, float texGamma, float brightness, int overbright )
{ {

View File

@ -16,8 +16,10 @@
#include "tier0/vprof.h" #include "tier0/vprof.h"
//#define _VPROF_MATHLIB //#define _VPROF_MATHLIB
#ifdef _WIN32
#pragma warning(disable:4244) // "conversion from 'const int' to 'float', possible loss of data" #pragma warning(disable:4244) // "conversion from 'const int' to 'float', possible loss of data"
#pragma warning(disable:4730) // "mixing _m64 and floating point expressions may result in incorrect code" #pragma warning(disable:4730) // "mixing _m64 and floating point expressions may result in incorrect code"
#endif
#include "mathlib/mathlib.h" #include "mathlib/mathlib.h"
#include "mathlib/vector.h" #include "mathlib/vector.h"

View File

@ -18,7 +18,9 @@
// memdbgon must be the last include file in a .cpp file!!! // memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning (disable : 4700) // local variable 'x' used without having been initialized #pragma warning (disable : 4700) // local variable 'x' used without having been initialized
#endif
// ------------------------------------------------------------------------------------------- // // ------------------------------------------------------------------------------------------- //
// Helper functions. // Helper functions.

View File

@ -245,7 +245,9 @@ void zfree(void *buf)
} }
*/ */
#ifdef _WIN32
#pragma warning(disable : 4702) // unreachable code #pragma warning(disable : 4702) // unreachable code
#endif
typedef struct tm_unz_s typedef struct tm_unz_s
{ unsigned int tm_sec; // seconds after the minute - [0,59] { unsigned int tm_sec; // seconds after the minute - [0,59]

View File

@ -29,8 +29,10 @@ typedef enum _D3DFORMAT D3DFORMAT;
// The various image format types // The various image format types
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
// don't bitch that inline functions aren't used!!!! // don't bitch that inline functions aren't used!!!!
#pragma warning(disable : 4514) #pragma warning(disable : 4514)
#endif
enum ImageFormat enum ImageFormat
{ {

View File

@ -5127,9 +5127,9 @@ float Studio_GetPoseParameter( const CStudioHdr *pStudioHdr, int iParameter, flo
return ctlValue * (PoseParam.end - PoseParam.start) + PoseParam.start; return ctlValue * (PoseParam.end - PoseParam.start) + PoseParam.start;
} }
#ifdef _WIN32
#pragma warning (disable : 4701) #pragma warning (disable : 4701)
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:
@ -5237,8 +5237,9 @@ static int ClipRayToHitbox( const Ray_t &ray, mstudiobbox_t *pbox, matrix3x4_t&
return hitside; return hitside;
} }
#ifdef _WIN32
#pragma warning (default : 4701) #pragma warning (default : 4701)
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:

View File

@ -792,7 +792,9 @@ struct dfaceid_t
#if defined( _X360 ) #if defined( _X360 )
#pragma bitfield_order( push, lsb_to_msb ) #pragma bitfield_order( push, lsb_to_msb )
#endif #endif
#ifdef _WIN32
#pragma warning( disable:4201 ) // C4201: nonstandard extension used: nameless struct/union #pragma warning( disable:4201 ) // C4201: nonstandard extension used: nameless struct/union
#endif
struct dleaf_version_0_t struct dleaf_version_0_t
{ {
DECLARE_BYTESWAP_DATADESC(); DECLARE_BYTESWAP_DATADESC();
@ -846,7 +848,9 @@ struct dleaf_t
// Precaculated light info for entities. // Precaculated light info for entities.
// CompressedLightCube m_AmbientLighting; // CompressedLightCube m_AmbientLighting;
}; };
#ifdef _WIN32
#pragma warning( default:4201 ) // C4201: nonstandard extension used: nameless struct/union #pragma warning( default:4201 ) // C4201: nonstandard extension used: nameless struct/union
#endif
#if defined( _X360 ) #if defined( _X360 )
#pragma bitfield_order( pop ) #pragma bitfield_order( pop )
#endif #endif

View File

@ -10,10 +10,17 @@
#pragma once #pragma once
#endif #endif
#ifdef _WIN32
#pragma warning(push, 1) #pragma warning(push, 1)
#pragma warning(disable:4701 4702 4530) #pragma warning(disable:4701 4702 4530)
#endif
#include <fstream> #include <fstream>
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif
#include "TokenReader.h" #include "TokenReader.h"
#include "GDClass.h" #include "GDClass.h"
#include "InputOutput.h" #include "InputOutput.h"

View File

@ -12,11 +12,17 @@
#include <tier0/dbg.h> #include <tier0/dbg.h>
#include <utlvector.h> #include <utlvector.h>
#include <utldict.h> #include <utldict.h>
#ifdef _WIN32
#pragma warning(push, 1) #pragma warning(push, 1)
#pragma warning(disable:4701 4702 4530) #pragma warning(disable:4701 4702 4530)
#include <fstream> #endif
#pragma warning(pop)
#include <fstream>
#ifdef _WIN32
#pragma warning(pop)
#endif
#define KEYVALUE_MAX_KEY_LENGTH 80 #define KEYVALUE_MAX_KEY_LENGTH 80
#define KEYVALUE_MAX_VALUE_LENGTH 512 #define KEYVALUE_MAX_VALUE_LENGTH 512

View File

@ -1,7 +1,7 @@
#ifndef HAPTICS_INTERFACE_H #ifndef HAPTICS_INTERFACE_H
#define HAPTICS_INTERFACE_H #define HAPTICS_INTERFACE_H
#ifdef GAME_DLL #if defined( GAME_DLL ) && defined( _WIN32 )
#pragma warning("IHaptics.h is only for client ussage"); #pragma warning("IHaptics.h is only for client ussage");
#endif #endif

View File

@ -13,7 +13,10 @@
#include <string.h> #include <string.h>
typedef unsigned char byte; typedef unsigned char byte;
#ifdef _WIN32
#pragma warning(disable:4244) #pragma warning(disable:4244)
#endif
#include "tier0/dbg.h" #include "tier0/dbg.h"
#include "mathlib/vector.h" #include "mathlib/vector.h"

View File

@ -593,7 +593,9 @@
// The Microsoft Visual C++ version of the 3DNow! macros. // The Microsoft Visual C++ version of the 3DNow! macros.
// Stop the "no EMMS" warning, since it doesn't detect FEMMS properly // Stop the "no EMMS" warning, since it doesn't detect FEMMS properly
#ifdef _WIN32
#pragma warning(disable:4799) #pragma warning(disable:4799)
#endif
// Defines for operands. // Defines for operands.
#define _K3D_MM0 0xc0 #define _K3D_MM0 0xc0

View File

@ -18,8 +18,9 @@
#include "basehandle.h" #include "basehandle.h"
#endif #endif
#ifdef _WIN32
#pragma warning( disable : 4284 ) // warning C4284: return type for 'CNetworkVarT<int>::operator ->' is 'int *' (ie; not a UDT or reference to a UDT. Will produce errors if applied using infix notation) #pragma warning( disable : 4284 ) // warning C4284: return type for 'CNetworkVarT<int>::operator ->' is 'int *' (ie; not a UDT or reference to a UDT. Will produce errors if applied using infix notation)
#endif
#define MyOffsetOf( type, var ) ( (int)&((type*)0)->var ) #define MyOffsetOf( type, var ) ( (int)&((type*)0)->var )

View File

@ -32,7 +32,9 @@
#include "shaderlib/ShaderDLL.h" #include "shaderlib/ShaderDLL.h"
// make "local variable is initialized but not referenced" warnings errors for combo checking macros // make "local variable is initialized but not referenced" warnings errors for combo checking macros
#ifdef _WIN32
#pragma warning ( error : 4189 ) #pragma warning ( error : 4189 )
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Global interfaces // Global interfaces

View File

@ -68,7 +68,9 @@ enum UnitEncode
# pragma pack(pop) # pragma pack(pop)
// Turn off the no return value warning in ReadCounter. // Turn off the no return value warning in ReadCounter.
#ifdef _WIN32
#pragma warning( disable : 4035 ) #pragma warning( disable : 4035 )
#endif
#define k8NUM_COUNTERS 4 #define k8NUM_COUNTERS 4
class k8BaseEvent class k8BaseEvent
{ {
@ -250,7 +252,9 @@ public:
}; };
#ifdef _WIN32
#pragma warning( default : 4035 ) #pragma warning( default : 4035 )
#endif

View File

@ -8,7 +8,9 @@
#ifndef P4PERFORMANCECOUNTERS_H #ifndef P4PERFORMANCECOUNTERS_H
#define P4PERFORMANCECOUNTERS_H #define P4PERFORMANCECOUNTERS_H
#ifdef _WIN32
#pragma once #pragma once
#endif
// Pentium 4 support // Pentium 4 support
/* /*
@ -75,7 +77,9 @@ enum Counters
// register base for CCCR register // register base for CCCR register
#define MSR_CCCR_BASE 0x360 #define MSR_CCCR_BASE 0x360
#ifdef _WIN32
#pragma pack(push, 1) #pragma pack(push, 1)
#endif
// access to these bits is through the methods // access to these bits is through the methods
typedef union ESCR typedef union ESCR
{ {
@ -121,7 +125,9 @@ typedef union CCCR
} CCCR; } CCCR;
#ifdef _WIN32
#pragma pack(pop) #pragma pack(pop)
#endif
extern const unsigned short cccr_escr_map[NCOUNTERS][8]; extern const unsigned short cccr_escr_map[NCOUNTERS][8];
@ -144,7 +150,9 @@ enum P4OverflowInterrupt
}; };
// Turn off the no return value warning in ReadCounter. // Turn off the no return value warning in ReadCounter.
#ifdef _WIN32
#pragma warning( disable : 4035 ) #pragma warning( disable : 4035 )
#endif
class P4BaseEvent class P4BaseEvent
{ {
int m_counter; int m_counter;
@ -314,7 +322,9 @@ public:
pme->WriteMSR( cccrPort, cccr.flat ); pme->WriteMSR( cccrPort, cccr.flat );
} }
}; };
#ifdef _WIN32
#pragma warning( default : 4035 ) #pragma warning( default : 4035 )
#endif
#include "EventMasks.h" #include "EventMasks.h"
#include "EventModes.h" #include "EventModes.h"

View File

@ -12,8 +12,10 @@
#include "tier0/platform.h" #include "tier0/platform.h"
// Get rid of a bunch of STL warnings! // Get rid of a bunch of STL warnings!
#ifdef _WIN32
#pragma warning( push, 3 ) #pragma warning( push, 3 )
#pragma warning( disable : 4018 ) #pragma warning( disable : 4018 )
#endif
#define VERSION "1.0.2" #define VERSION "1.0.2"
@ -187,6 +189,8 @@ enum PerfErrors
E_ILLEGAL_OPERATION = -10, E_ILLEGAL_OPERATION = -10,
}; };
#ifdef _WIN32
#pragma warning( pop ) #pragma warning( pop )
#endif
#endif // PMELIB_H #endif // PMELIB_H

View File

@ -811,7 +811,9 @@ void InvalidParameterViolation()
// Disable compiler optimizations. If we don't do this then VC++ generates code // Disable compiler optimizations. If we don't do this then VC++ generates code
// that confuses the Visual Studio debugger and causes it to display completely // that confuses the Visual Studio debugger and causes it to display completely
// random call stacks. That makes the minidumps excruciatingly hard to understand. // random call stacks. That makes the minidumps excruciatingly hard to understand.
#ifdef _WIN32
#pragma optimize("", off) #pragma optimize("", off)
#endif
// Write a minidump file, unless running under the debugger in which case break // Write a minidump file, unless running under the debugger in which case break
// into the debugger. // into the debugger.
@ -848,7 +850,9 @@ void VInvalidParameterHandler(const wchar_t* expression,
} }
// Restore compiler optimizations. // Restore compiler optimizations.
#ifdef _WIN32
#pragma optimize("", on) #pragma optimize("", on)
#endif
// Helper class for registering error callbacks. See above for details. // Helper class for registering error callbacks. See above for details.
class ErrorHandlerRegistrar class ErrorHandlerRegistrar
@ -1592,8 +1596,10 @@ class _LocaleUpdate
}; };
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 4483) #pragma warning(disable: 4483)
#endif
#if _MSC_FULL_VER >= 140050415 #if _MSC_FULL_VER >= 140050415
#define _NATIVE_STARTUP_NAMESPACE __identifier("<CrtImplementationDetails>") #define _NATIVE_STARTUP_NAMESPACE __identifier("<CrtImplementationDetails>")
#else /* _MSC_FULL_VER >= 140050415 */ #else /* _MSC_FULL_VER >= 140050415 */
@ -1649,7 +1655,9 @@ namespace _NATIVE_STARTUP_NAMESPACE
} }
}; };
} }
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif
#endif // _MSC_VER >= 1400 #endif // _MSC_VER >= 1400

View File

@ -666,7 +666,7 @@ typedef void * HINSTANCE;
// When we port to 64 bit, we'll have to resolve the int, ptr vs size_t 32/64 bit problems... // When we port to 64 bit, we'll have to resolve the int, ptr vs size_t 32/64 bit problems...
#if !defined( _WIN64 ) #if !defined( _WIN64 ) && defined ( _WIN32 )
#pragma warning( disable : 4267 ) // conversion from 'size_t' to 'int', possible loss of data #pragma warning( disable : 4267 ) // conversion from 'size_t' to 'int', possible loss of data
#pragma warning( disable : 4311 ) // pointer truncation from 'char *' to 'int' #pragma warning( disable : 4311 ) // pointer truncation from 'char *' to 'int'
#pragma warning( disable : 4312 ) // conversion from 'unsigned int' to 'memhandle_t' of greater size #pragma warning( disable : 4312 ) // conversion from 'unsigned int' to 'memhandle_t' of greater size

View File

@ -579,7 +579,9 @@ void ConVar_PrintDescription( const ConCommandBase *pVar );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Utility class to quickly allow ConCommands to call member methods // Purpose: Utility class to quickly allow ConCommands to call member methods
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning (disable : 4355 ) #pragma warning (disable : 4355 )
#endif
template< class T > template< class T >
class CConCommandMemberAccessor : public ConCommand, public ICommandCallback, public ICommandCompletionCallback class CConCommandMemberAccessor : public ConCommand, public ICommandCallback, public ICommandCompletionCallback
@ -626,8 +628,9 @@ private:
FnMemberCommandCompletionCallback_t m_CompletionFunc; FnMemberCommandCompletionCallback_t m_CompletionFunc;
}; };
#ifdef _WIN32
#pragma warning ( default : 4355 ) #pragma warning ( default : 4355 )
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Utility macros to quicky generate a simple console command // Purpose: Utility macros to quicky generate a simple console command

View File

@ -21,8 +21,10 @@
#include "tier0/memalloc.h" #include "tier0/memalloc.h"
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning (disable:4100) #pragma warning (disable:4100)
#pragma warning (disable:4514) #pragma warning (disable:4514)
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -20,8 +20,10 @@
#include "tier0/memalloc.h" #include "tier0/memalloc.h"
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning (disable:4100) #pragma warning (disable:4100)
#pragma warning (disable:4514) #pragma warning (disable:4514)
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -545,8 +545,10 @@ inline I CUtlLinkedList<T,S,ML,I,M>::PrivateNext( I i ) const
// Are nodes in the list or valid? // Are nodes in the list or valid?
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning( disable: 4310 ) // Allows "(I)(S)M::INVALID_INDEX" below #pragma warning( disable: 4310 ) // Allows "(I)(S)M::INVALID_INDEX" below
#endif
template <class T, class S, bool ML, class I, class M> template <class T, class S, bool ML, class I, class M>
inline bool CUtlLinkedList<T,S,ML,I,M>::IndexInRange( I index ) // Static method inline bool CUtlLinkedList<T,S,ML,I,M>::IndexInRange( I index ) // Static method
{ {
@ -565,7 +567,9 @@ inline bool CUtlLinkedList<T,S,ML,I,M>::IndexInRange( I index ) // Static method
return ( ( (S)index == index ) && ( (S)index != InvalidIndex() ) ); return ( ( (S)index == index ) && ( (S)index != InvalidIndex() ) );
} }
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif
template <class T, class S, bool ML, class I, class M> template <class T, class S, bool ML, class I, class M>
inline bool CUtlLinkedList<T,S,ML,I,M>::IsValidIndex( I i ) const inline bool CUtlLinkedList<T,S,ML,I,M>::IsValidIndex( I i ) const

View File

@ -22,9 +22,10 @@
#include "tier0/memalloc.h" #include "tier0/memalloc.h"
#include "tier0/memdbgon.h" #include "tier0/memdbgon.h"
#ifdef _WIN32
#pragma warning (disable:4100) #pragma warning (disable:4100)
#pragma warning (disable:4514) #pragma warning (disable:4514)
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -662,8 +662,10 @@ inline void CUtlRBTree<T, I, L, M>::SetColor( I i, typename CUtlRBTree<T, I, L,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Allocates/ deallocates nodes // Allocates/ deallocates nodes
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4389) // '==' : signed/unsigned mismatch #pragma warning(disable:4389) // '==' : signed/unsigned mismatch
#endif
template < class T, class I, typename L, class M > template < class T, class I, typename L, class M >
I CUtlRBTree<T, I, L, M>::NewNode() I CUtlRBTree<T, I, L, M>::NewNode()
{ {
@ -708,7 +710,9 @@ I CUtlRBTree<T, I, L, M>::NewNode()
return elem; return elem;
} }
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif
template < class T, class I, typename L, class M > template < class T, class I, typename L, class M >
void CUtlRBTree<T, I, L, M>::FreeNode( I i ) void CUtlRBTree<T, I, L, M>::FreeNode( I i )

View File

@ -278,9 +278,11 @@ public:
// Especialy useful if you have a lot of vectors that are sparse, or if you're // Especialy useful if you have a lot of vectors that are sparse, or if you're
// carefully packing holders of vectors // carefully packing holders of vectors
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4200) // warning C4200: nonstandard extension used : zero-sized array in struct/union #pragma warning(disable : 4200) // warning C4200: nonstandard extension used : zero-sized array in struct/union
#pragma warning(disable : 4815 ) // warning C4815: 'staticData' : zero-sized array in stack object will have no elements #pragma warning(disable : 4815 ) // warning C4815: 'staticData' : zero-sized array in stack object will have no elements
#endif
class CUtlVectorUltraConservativeAllocator class CUtlVectorUltraConservativeAllocator
{ {
@ -518,7 +520,9 @@ private:
} }
}; };
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -124,8 +124,10 @@ bool LessFunc_GLMTexLayoutKey( const GLMTexLayoutKey &a, const GLMTexLayoutKey &
#define GLM_TEX_MAX_FACES 6 #define GLM_TEX_MAX_FACES 6
#define GLM_TEX_MAX_SLICES (GLM_TEX_MAX_MIPS * GLM_TEX_MAX_FACES) #define GLM_TEX_MAX_SLICES (GLM_TEX_MAX_MIPS * GLM_TEX_MAX_FACES)
#ifdef _WIN32
#pragma warning( push ) #pragma warning( push )
#pragma warning( disable : 4200 ) #pragma warning( disable : 4200 )
#endif
struct GLMTexLayout struct GLMTexLayout
{ {
@ -148,7 +150,9 @@ struct GLMTexLayout
GLMTexLayoutSlice m_slices[0]; // dynamically allocated 2-d array [faces][mips] GLMTexLayoutSlice m_slices[0]; // dynamically allocated 2-d array [faces][mips]
}; };
#ifdef _WIN32
#pragma warning( pop ) #pragma warning( pop )
#endif
class CGLMTexLayoutTable class CGLMTexLayoutTable
{ {

View File

@ -22,6 +22,7 @@
#endif #endif
#endif #endif
#ifdef _WIN32
#pragma warning( disable: 4800 ) // disables 'performance warning converting int to bool' #pragma warning( disable: 4800 ) // disables 'performance warning converting int to bool'
#pragma warning( disable: 4786 ) // disables 'identifier truncated in browser information' warning #pragma warning( disable: 4786 ) // disables 'identifier truncated in browser information' warning
#pragma warning( disable: 4355 ) // disables 'this' : used in base member initializer list #pragma warning( disable: 4355 ) // disables 'this' : used in base member initializer list
@ -29,6 +30,7 @@
#pragma warning( disable: 4514 ) // warning C4514: 'Color::Color' : unreferenced inline function has been removed #pragma warning( disable: 4514 ) // warning C4514: 'Color::Color' : unreferenced inline function has been removed
#pragma warning( disable: 4100 ) // warning C4100: 'code' : unreferenced formal parameter #pragma warning( disable: 4100 ) // warning C4100: 'code' : unreferenced formal parameter
#pragma warning( disable: 4127 ) // warning C4127: conditional expression is constant #pragma warning( disable: 4127 ) // warning C4127: conditional expression is constant
#endif
typedef unsigned char uchar; typedef unsigned char uchar;
typedef unsigned short ushort; typedef unsigned short ushort;

View File

@ -55,7 +55,9 @@ typedef void (Panel::*MessageFunc_t)(void);
// Contains the information to map a string message name with parameters // Contains the information to map a string message name with parameters
// to a function call // to a function call
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning(disable:4121) #pragma warning(disable:4121)
#endif
struct MessageMapItem_t struct MessageMapItem_t
{ {
const char *name; const char *name;

View File

@ -11,8 +11,9 @@
// $NoKeywords: $ // $NoKeywords: $
//============================================================================= //=============================================================================
#ifdef _WIN32
#pragma warning(disable: 4514) #pragma warning(disable: 4514)
#endif
// First include standard libraries // First include standard libraries
#include <stdio.h> #include <stdio.h>

View File

@ -16,8 +16,10 @@
#define NTAB 32 #define NTAB 32
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning( disable:4251 ) #pragma warning( disable:4251 )
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// A generator of uniformly distributed random numbers // A generator of uniformly distributed random numbers
@ -102,8 +104,9 @@ VSTDLIB_INTERFACE float RandomGaussianFloat( float flMean = 0.0f, float flStdDev
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
VSTDLIB_INTERFACE void InstallUniformRandomStream( IUniformRandomStream *pStream ); VSTDLIB_INTERFACE void InstallUniformRandomStream( IUniformRandomStream *pStream );
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif
#endif // VSTDLIB_RANDOM_H #endif // VSTDLIB_RANDOM_H

View File

@ -521,7 +521,9 @@ const char *KeyValues::GetName( void ) const
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Read a single token from buffer (0 terminated) // Purpose: Read a single token from buffer (0 terminated)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning (disable:4706) #pragma warning (disable:4706)
#endif
const char *KeyValues::ReadToken( CUtlBuffer &buf, bool &wasQuoted, bool &wasConditional ) const char *KeyValues::ReadToken( CUtlBuffer &buf, bool &wasQuoted, bool &wasConditional )
{ {
wasQuoted = false; wasQuoted = false;
@ -605,7 +607,9 @@ const char *KeyValues::ReadToken( CUtlBuffer &buf, bool &wasQuoted, bool &wasCon
s_pTokenBuf[ nCount ] = 0; s_pTokenBuf[ nCount ] = 0;
return s_pTokenBuf; return s_pTokenBuf;
} }
#ifdef _WIN32
#pragma warning (default:4706) #pragma warning (default:4706)
#endif

View File

@ -9,7 +9,9 @@
#include "tier1/ilocalize.h" #include "tier1/ilocalize.h"
#include "utlstring.h" #include "utlstring.h"
#ifdef _WIN32
#pragma warning( disable: 4018 ) // '<' : signed/unsigned mismatch #pragma warning( disable: 4018 ) // '<' : signed/unsigned mismatch
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: converts an english string to unicode // Purpose: converts an english string to unicode

View File

@ -6,7 +6,9 @@
// Serialization buffer // Serialization buffer
//===========================================================================// //===========================================================================//
#ifdef _WIN32
#pragma warning (disable : 4514) #pragma warning (disable : 4514)
#endif
#include "utlbuffer.h" #include "utlbuffer.h"
#include <stdio.h> #include <stdio.h>
@ -904,7 +906,9 @@ void CUtlBuffer::SeekGet( SeekType_t type, int offset )
// Parse... // Parse...
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning ( disable : 4706 ) #pragma warning ( disable : 4706 )
#endif
int CUtlBuffer::VaScanf( const char* pFmt, va_list list ) int CUtlBuffer::VaScanf( const char* pFmt, va_list list )
{ {
@ -1075,7 +1079,9 @@ int CUtlBuffer::VaScanf( const char* pFmt, va_list list )
return numScanned; return numScanned;
} }
#ifdef _WIN32
#pragma warning ( default : 4706 ) #pragma warning ( default : 4706 )
#endif
int CUtlBuffer::Scanf( const char* pFmt, ... ) int CUtlBuffer::Scanf( const char* pFmt, ... )
{ {

View File

@ -6,7 +6,9 @@
// Serialization buffer // Serialization buffer
//===========================================================================// //===========================================================================//
#ifdef _WIN32
#pragma warning (disable : 4514) #pragma warning (disable : 4514)
#endif
#include "tier1/utlbufferutil.h" #include "tier1/utlbufferutil.h"
#include "tier1/utlbuffer.h" #include "tier1/utlbuffer.h"

View File

@ -6,7 +6,9 @@
// $NoKeywords: $ // $NoKeywords: $
//=============================================================================// //=============================================================================//
#ifdef _WIN32
#pragma warning (disable:4514) #pragma warning (disable:4514)
#endif
#include "utlsymbol.h" #include "utlsymbol.h"
#include "KeyValues.h" #include "KeyValues.h"

View File

@ -8,9 +8,10 @@
#include <windows.h> #include <windows.h>
#include "consolewnd.h" #include "consolewnd.h"
#ifdef _WIN32
#pragma warning( disable : 4311 ) // warning C4311: 'reinterpret_cast' : pointer truncation from 'CConsoleWnd *const ' to 'LONG' #pragma warning( disable : 4311 ) // warning C4311: 'reinterpret_cast' : pointer truncation from 'CConsoleWnd *const ' to 'LONG'
#pragma warning( disable : 4312 ) // warning C4312: 'type cast' : conversion from 'LONG' to 'CConsoleWnd *' of greater size #pragma warning( disable : 4312 ) // warning C4312: 'type cast' : conversion from 'LONG' to 'CConsoleWnd *' of greater size
#endif
#define EDITCONTROL_BORDER_SIZE 5 #define EDITCONTROL_BORDER_SIZE 5

View File

@ -13,11 +13,13 @@
// Copyright (c) 1999-2000 Microsoft Corporation. All rights reserved. // Copyright (c) 1999-2000 Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
// identifier was truncated to '255' characters in the debug information // identifier was truncated to '255' characters in the debug information
#pragma warning(disable: 4786) #pragma warning(disable: 4786)
// conversion from 'double' to 'float' // conversion from 'double' to 'float'
#pragma warning(disable: 4244) #pragma warning(disable: 4244)
#pragma warning(disable: 4530) #pragma warning(disable: 4530)
#endif
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>

View File

@ -39,9 +39,13 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef _WIN32
#pragma warning(disable: 4142 4028) #pragma warning(disable: 4142 4028)
#endif
#include <io.h> #include <io.h>
#ifdef _WIN32
#pragma warning(default: 4142 4028) #pragma warning(default: 4142 4028)
#endif
#include <fcntl.h> #include <fcntl.h>
#include <direct.h> #include <direct.h>

View File

@ -1713,8 +1713,10 @@ const byte *CChromePainter::PPopupTextureDataCached()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Client implementation of the browser handler class // Purpose: Client implementation of the browser handler class
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning( push ) #pragma warning( push )
#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list #pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
#endif
CClientHandler::CClientHandler( int iBrowser, const char *pchUserAgent, uint16 nSerial ) : m_Painter( this ) CClientHandler::CClientHandler( int iBrowser, const char *pchUserAgent, uint16 nSerial ) : m_Painter( this )
{ {
m_nSerial = nSerial; m_nSerial = nSerial;
@ -1737,7 +1739,9 @@ CClientHandler::CClientHandler( int iBrowser, const char *pchUserAgent, uint16 n
memset( &m_CachedHScroll, 0, sizeof( m_CachedHScroll ) ); memset( &m_CachedHScroll, 0, sizeof( m_CachedHScroll ) );
memset( &m_CachedVScroll, 0, sizeof( m_CachedVScroll ) ); memset( &m_CachedVScroll, 0, sizeof( m_CachedVScroll ) );
} }
#ifdef _WIN32
#pragma warning( pop ) #pragma warning( pop )
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -3,7 +3,9 @@
// Purpose: // Purpose:
// //
//=============================================================================// //=============================================================================//
#ifdef _WIN32
#pragma warning( disable : 4244 ) // conversion from 'double' to 'float', possible loss of data #pragma warning( disable : 4244 ) // conversion from 'double' to 'float', possible loss of data
#endif
#include <vgui/IScheme.h> #include <vgui/IScheme.h>
#include <vgui/ISurface.h> #include <vgui/ISurface.h>

View File

@ -115,7 +115,9 @@ class BuildModeLocalizedStringEditDialog : public Frame
public: public:
#ifdef _WIN32
#pragma warning( disable : 4355 ) #pragma warning( disable : 4355 )
#endif
BuildModeLocalizedStringEditDialog() : Frame(this, NULL) BuildModeLocalizedStringEditDialog() : Frame(this, NULL)
{ {
m_pTokenEntry = new TextEntry(this, NULL); m_pTokenEntry = new TextEntry(this, NULL);
@ -133,7 +135,9 @@ public:
m_pFileCombo->AddItem(g_pVGuiLocalize->GetLocalizationFileName(i), NULL); m_pFileCombo->AddItem(g_pVGuiLocalize->GetLocalizationFileName(i), NULL);
} }
} }
#ifdef _WIN32
#pragma warning( default : 4355 ) #pragma warning( default : 4355 )
#endif
virtual void DoModal(const char *token) virtual void DoModal(const char *token)
{ {

View File

@ -49,7 +49,9 @@ DECLARE_BUILD_FACTORY( EditablePanel );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Constructor // Purpose: Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#ifdef _WIN32
#pragma warning( disable : 4355 ) #pragma warning( disable : 4355 )
#endif
EditablePanel::EditablePanel(Panel *parent, const char *panelName) : Panel(parent, panelName), m_NavGroup(this) EditablePanel::EditablePanel(Panel *parent, const char *panelName) : Panel(parent, panelName), m_NavGroup(this)
{ {
@ -78,7 +80,9 @@ EditablePanel::EditablePanel(Panel *parent, const char *panelName, HScheme hSche
SetBuildGroup(GetBuildGroup()); SetBuildGroup(GetBuildGroup());
} }
#ifdef _WIN32
#pragma warning( default : 4355 ) #pragma warning( default : 4355 )
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Destructor // Purpose: Destructor