mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2024-12-22 09:38:56 +08:00
Allow compilation on gcc/clang without -Wno-unknown-pragmas.
This commit is contained in:
parent
34d4b05185
commit
9889382863
@ -22,9 +22,11 @@
|
||||
#define ALIGN64( a ) a = (byte *)((int)((byte *)a + 63) & ~ 63)
|
||||
|
||||
// Fixup macros create variables that may not be referenced
|
||||
#ifdef _WIN32
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable:4189 ) // local variable is initialized but not referenced
|
||||
#pragma warning( disable:4366 ) // The result of the unary '&' operator may be unaligned
|
||||
#endif
|
||||
|
||||
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
|
||||
#endif
|
||||
|
||||
} // namespace StudioByteSwap
|
||||
|
||||
|
@ -16,7 +16,9 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
|
||||
|
||||
const int MAX_ERRORS = 5;
|
||||
|
@ -20,7 +20,9 @@ public:
|
||||
|
||||
EXPOSE_INTERFACE( CAnimatedTextureProxy, IMaterialProxy, "AnimatedTexture" IMATERIAL_PROXY_INTERFACE_VERSION );
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4100)
|
||||
#endif
|
||||
|
||||
float CAnimatedTextureProxy::GetAnimationStartTime( void* pBaseEntity )
|
||||
{
|
||||
|
@ -13,7 +13,9 @@
|
||||
class IMaterial;
|
||||
class IMaterialVar;
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4100)
|
||||
#endif
|
||||
|
||||
class CBaseAnimatedTextureProxy : public IMaterialProxy
|
||||
{
|
||||
|
@ -8,7 +8,9 @@
|
||||
|
||||
#include "cbase.h"
|
||||
// identifier was truncated to '255' characters in the debug information
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable: 4786)
|
||||
#endif
|
||||
|
||||
#include "proxyentity.h"
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
@ -113,8 +115,9 @@ void CCamoTextureRegen::RegenerateTextureBits( ITexture *pTexture, IVTFTexture *
|
||||
m_pProxy->GenerateCamoTexture( pTexture, pVTFTexture );
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4355)
|
||||
#endif
|
||||
|
||||
CCamoMaterialProxy::CCamoMaterialProxy() : m_TextureRegen(this)
|
||||
{
|
||||
@ -136,7 +139,9 @@ CCamoMaterialProxy::CCamoMaterialProxy() : m_TextureRegen(this)
|
||||
m_pEnt = NULL;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (default:4355)
|
||||
#endif
|
||||
|
||||
CCamoMaterialProxy::~CCamoMaterialProxy()
|
||||
{
|
||||
|
@ -247,13 +247,17 @@ protected:
|
||||
|
||||
static CUtlMap<CDetailModel *, LightStyleInfo_t> gm_LightStylesMap;
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4201 ) //warning C4201: nonstandard extension used : nameless struct/union
|
||||
#endif
|
||||
union
|
||||
{
|
||||
model_t* m_pModel;
|
||||
SptrintInfo_t m_SpriteInfo;
|
||||
};
|
||||
#ifdef _WIN32
|
||||
#pragma warning( default : 4201 )
|
||||
#endif
|
||||
|
||||
#ifdef USE_DETAIL_SHAPES
|
||||
// pointer to advanced properties
|
||||
|
@ -17,7 +17,9 @@
|
||||
#include "PortalRender.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable: 4355 ) // warning C4355: 'this' : used in base member initializer list
|
||||
#endif
|
||||
|
||||
class CClientTools;
|
||||
|
||||
|
@ -11,7 +11,9 @@
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4800 ) // disable forcing int to bool performance warning
|
||||
#endif
|
||||
|
||||
#include "cbase.h"
|
||||
#include <cdll_client_int.h>
|
||||
|
@ -10,8 +10,10 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
// warning C4660: template-class specialization 'CInterpolatedVar<float>' is already instantiated
|
||||
#pragma warning( disable : 4660 )
|
||||
#endif
|
||||
|
||||
template class CInterpolatedVar<float>;
|
||||
template class CInterpolatedVar<Vector>;
|
||||
|
@ -13,7 +13,9 @@
|
||||
|
||||
#include "cbase.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4800 ) // disable forcing int to bool performance warning
|
||||
#endif
|
||||
|
||||
// VGUI panel includes
|
||||
#include <vgui_controls/Panel.h>
|
||||
|
@ -13,7 +13,9 @@
|
||||
class IMaterial;
|
||||
class IMaterialVar;
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4100)
|
||||
#endif
|
||||
|
||||
class CBaseToggleTextureProxy : public IMaterialProxy
|
||||
{
|
||||
|
@ -6,7 +6,10 @@
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable: 4514)
|
||||
#endif
|
||||
|
||||
#include "vgui_bitmapimage.h"
|
||||
#include "vgui_bitmapbutton.h"
|
||||
|
@ -6,7 +6,11 @@
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable: 4514)
|
||||
#endif
|
||||
|
||||
#include "vgui_bitmappanel.h"
|
||||
#include <KeyValues.h>
|
||||
#include "panelmetaclassmgr.h"
|
||||
|
@ -15,11 +15,15 @@
|
||||
#include "networkvar.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#endif // _WIN32
|
||||
#include <typeinfo>
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#pragma warning(disable:4290)
|
||||
#endif
|
||||
#endif // _WIN32
|
||||
#endif // DEBUG
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
|
@ -34,8 +34,10 @@ void DebugNoteMovementFailure()
|
||||
}
|
||||
|
||||
// a place to put breakpoints
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4189)
|
||||
#endif
|
||||
AIMoveResult_t DbgResult( AIMoveResult_t result )
|
||||
{
|
||||
if ( result < AIMR_OK )
|
||||
|
@ -433,8 +433,10 @@ int __cdecl AdvisorStagingComparator(const EHANDLE *pe1, const EHANDLE *pe2)
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4706)
|
||||
#endif
|
||||
|
||||
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 !");
|
||||
#endif
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -94,7 +94,9 @@ const char *g_ppszRandomCombineModels[] =
|
||||
|
||||
#define HL2MPPLAYER_PHYSDAMAGE_SCALE 4.0f
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4355 )
|
||||
#endif
|
||||
|
||||
CHL2MP_Player::CHL2MP_Player() : m_PlayerAnimState( this )
|
||||
{
|
||||
|
@ -18,10 +18,14 @@
|
||||
#ifndef _XBOX
|
||||
#undef min
|
||||
#undef max
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#endif // _WIN32
|
||||
#include <set>
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // _WIN32
|
||||
#endif // _XBOX
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
|
@ -71,12 +71,16 @@ LINK_ENTITY_TO_CLASS( prop_vehicle, CPropVehicle );
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4355)
|
||||
#endif
|
||||
CPropVehicle::CPropVehicle() : m_VehiclePhysics( this )
|
||||
{
|
||||
SetVehicleType( VEHICLE_TYPE_CAR_WHEELS );
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning (default:4355)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
|
@ -25,7 +25,10 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4244 )
|
||||
#endif
|
||||
|
||||
#define iabs(i) (( (i) >= 0 ) ? (i) : -(i) )
|
||||
|
||||
int ExtractBbox( CStudioHdr *pstudiohdr, int sequence, Vector& mins, Vector& maxs )
|
||||
|
@ -29,7 +29,9 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4127 )
|
||||
#endif
|
||||
|
||||
// Let scene linger for 1/4 second so blends can finish
|
||||
#define SCENE_LINGER_TIME 0.25f
|
||||
|
@ -4837,7 +4837,9 @@ void CGameMovement::FullTossMove( void )
|
||||
// Purpose: TF2 commander mode movement logic
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4701)
|
||||
#endif
|
||||
|
||||
void CGameMovement::IsometricMove( void )
|
||||
{
|
||||
@ -4872,7 +4874,9 @@ void CGameMovement::IsometricMove( void )
|
||||
mv->m_vecVelocity.Init();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (default : 4701)
|
||||
#endif
|
||||
|
||||
|
||||
bool CGameMovement::GameHasLadders() const
|
||||
|
@ -16,7 +16,7 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#if !defined(COMPILER_MSVC64) && !defined(LINUX)
|
||||
#if !defined(COMPILER_MSVC64) && !defined(POSIX)
|
||||
// Implement for 64-bit Windows if needed.
|
||||
// Clang hits "fatal error: error in backend:" and other errors when trying
|
||||
// to compile the inline assembly below. 3DNow support is highly unlikely to
|
||||
|
@ -6,7 +6,10 @@
|
||||
|
||||
#include "mathlib/IceKey.H"
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable: 4244)
|
||||
#endif
|
||||
|
||||
|
||||
/* Structure of a single round subkey */
|
||||
|
@ -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
|
||||
// the precomputation is correct.
|
||||
#ifdef DBGFLAG_ASSERT
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning( disable : 4189 ) // disable unused local variable warning
|
||||
#endif
|
||||
static void CheckExponentTable()
|
||||
{
|
||||
for( int i = 0; i < 256; i++ )
|
||||
@ -120,8 +122,10 @@ static void CheckExponentTable()
|
||||
power2_n[i] == testAgainst );
|
||||
}
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void BuildGammaTable( float gamma, float texGamma, float brightness, int overbright )
|
||||
{
|
||||
|
@ -16,8 +16,10 @@
|
||||
#include "tier0/vprof.h"
|
||||
//#define _VPROF_MATHLIB
|
||||
|
||||
#ifdef _WIN32
|
||||
#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"
|
||||
#endif
|
||||
|
||||
#include "mathlib/mathlib.h"
|
||||
#include "mathlib/vector.h"
|
||||
|
@ -18,7 +18,9 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4700) // local variable 'x' used without having been initialized
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------------------- //
|
||||
// Helper functions.
|
||||
|
@ -245,7 +245,9 @@ void zfree(void *buf)
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable : 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
typedef struct tm_unz_s
|
||||
{ unsigned int tm_sec; // seconds after the minute - [0,59]
|
||||
|
@ -29,8 +29,10 @@ typedef enum _D3DFORMAT D3DFORMAT;
|
||||
// The various image format types
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef _WIN32
|
||||
// don't bitch that inline functions aren't used!!!!
|
||||
#pragma warning(disable : 4514)
|
||||
#endif
|
||||
|
||||
enum ImageFormat
|
||||
{
|
||||
|
@ -5127,9 +5127,9 @@ float Studio_GetPoseParameter( const CStudioHdr *pStudioHdr, int iParameter, flo
|
||||
return ctlValue * (PoseParam.end - PoseParam.start) + PoseParam.start;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4701)
|
||||
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
@ -5237,8 +5237,9 @@ static int ClipRayToHitbox( const Ray_t &ray, mstudiobbox_t *pbox, matrix3x4_t&
|
||||
return hitside;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (default : 4701)
|
||||
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
|
@ -792,7 +792,9 @@ struct dfaceid_t
|
||||
#if defined( _X360 )
|
||||
#pragma bitfield_order( push, lsb_to_msb )
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable:4201 ) // C4201: nonstandard extension used: nameless struct/union
|
||||
#endif
|
||||
struct dleaf_version_0_t
|
||||
{
|
||||
DECLARE_BYTESWAP_DATADESC();
|
||||
@ -846,7 +848,9 @@ struct dleaf_t
|
||||
// Precaculated light info for entities.
|
||||
// CompressedLightCube m_AmbientLighting;
|
||||
};
|
||||
#ifdef _WIN32
|
||||
#pragma warning( default:4201 ) // C4201: nonstandard extension used: nameless struct/union
|
||||
#endif
|
||||
#if defined( _X360 )
|
||||
#pragma bitfield_order( pop )
|
||||
#endif
|
||||
|
@ -10,10 +10,17 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push, 1)
|
||||
#pragma warning(disable:4701 4702 4530)
|
||||
#endif
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include "TokenReader.h"
|
||||
#include "GDClass.h"
|
||||
#include "InputOutput.h"
|
||||
|
@ -12,11 +12,17 @@
|
||||
#include <tier0/dbg.h>
|
||||
#include <utlvector.h>
|
||||
#include <utldict.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push, 1)
|
||||
#pragma warning(disable:4701 4702 4530)
|
||||
#include <fstream>
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#define KEYVALUE_MAX_KEY_LENGTH 80
|
||||
#define KEYVALUE_MAX_VALUE_LENGTH 512
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef 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");
|
||||
#endif
|
||||
|
||||
|
@ -13,7 +13,10 @@
|
||||
#include <string.h>
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
|
||||
#include "tier0/dbg.h"
|
||||
#include "mathlib/vector.h"
|
||||
|
@ -593,7 +593,9 @@
|
||||
// The Microsoft Visual C++ version of the 3DNow! macros.
|
||||
|
||||
// Stop the "no EMMS" warning, since it doesn't detect FEMMS properly
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable:4799)
|
||||
#endif
|
||||
|
||||
// Defines for operands.
|
||||
#define _K3D_MM0 0xc0
|
||||
|
@ -18,8 +18,9 @@
|
||||
#include "basehandle.h"
|
||||
#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)
|
||||
#endif
|
||||
|
||||
#define MyOffsetOf( type, var ) ( (int)&((type*)0)->var )
|
||||
|
||||
|
@ -32,7 +32,9 @@
|
||||
#include "shaderlib/ShaderDLL.h"
|
||||
|
||||
// make "local variable is initialized but not referenced" warnings errors for combo checking macros
|
||||
#ifdef _WIN32
|
||||
#pragma warning ( error : 4189 )
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Global interfaces
|
||||
|
@ -68,7 +68,9 @@ enum UnitEncode
|
||||
# pragma pack(pop)
|
||||
|
||||
// Turn off the no return value warning in ReadCounter.
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4035 )
|
||||
#endif
|
||||
#define k8NUM_COUNTERS 4
|
||||
class k8BaseEvent
|
||||
{
|
||||
@ -250,7 +252,9 @@ public:
|
||||
|
||||
|
||||
};
|
||||
#ifdef _WIN32
|
||||
#pragma warning( default : 4035 )
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +8,9 @@
|
||||
#ifndef P4PERFORMANCECOUNTERS_H
|
||||
#define P4PERFORMANCECOUNTERS_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
// Pentium 4 support
|
||||
|
||||
/*
|
||||
@ -75,7 +77,9 @@ enum Counters
|
||||
// register base for CCCR register
|
||||
#define MSR_CCCR_BASE 0x360
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
// access to these bits is through the methods
|
||||
typedef union ESCR
|
||||
{
|
||||
@ -121,7 +125,9 @@ typedef union CCCR
|
||||
|
||||
} CCCR;
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
extern const unsigned short cccr_escr_map[NCOUNTERS][8];
|
||||
|
||||
@ -144,7 +150,9 @@ enum P4OverflowInterrupt
|
||||
};
|
||||
|
||||
// Turn off the no return value warning in ReadCounter.
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4035 )
|
||||
#endif
|
||||
class P4BaseEvent
|
||||
{
|
||||
int m_counter;
|
||||
@ -314,7 +322,9 @@ public:
|
||||
pme->WriteMSR( cccrPort, cccr.flat );
|
||||
}
|
||||
};
|
||||
#ifdef _WIN32
|
||||
#pragma warning( default : 4035 )
|
||||
#endif
|
||||
|
||||
#include "EventMasks.h"
|
||||
#include "EventModes.h"
|
||||
|
@ -12,8 +12,10 @@
|
||||
#include "tier0/platform.h"
|
||||
|
||||
// Get rid of a bunch of STL warnings!
|
||||
#ifdef _WIN32
|
||||
#pragma warning( push, 3 )
|
||||
#pragma warning( disable : 4018 )
|
||||
#endif
|
||||
|
||||
#define VERSION "1.0.2"
|
||||
|
||||
@ -187,6 +189,8 @@ enum PerfErrors
|
||||
E_ILLEGAL_OPERATION = -10,
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
#endif // PMELIB_H
|
@ -811,7 +811,9 @@ void InvalidParameterViolation()
|
||||
// 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
|
||||
// random call stacks. That makes the minidumps excruciatingly hard to understand.
|
||||
#ifdef _WIN32
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
|
||||
// Write a minidump file, unless running under the debugger in which case break
|
||||
// into the debugger.
|
||||
@ -848,7 +850,9 @@ void VInvalidParameterHandler(const wchar_t* expression,
|
||||
}
|
||||
|
||||
// Restore compiler optimizations.
|
||||
#ifdef _WIN32
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
// Helper class for registering error callbacks. See above for details.
|
||||
class ErrorHandlerRegistrar
|
||||
@ -1592,8 +1596,10 @@ class _LocaleUpdate
|
||||
};
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4483)
|
||||
#endif
|
||||
#if _MSC_FULL_VER >= 140050415
|
||||
#define _NATIVE_STARTUP_NAMESPACE __identifier("<CrtImplementationDetails>")
|
||||
#else /* _MSC_FULL_VER >= 140050415 */
|
||||
@ -1649,7 +1655,9 @@ namespace _NATIVE_STARTUP_NAMESPACE
|
||||
}
|
||||
};
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // _MSC_VER >= 1400
|
||||
|
||||
|
@ -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...
|
||||
#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 : 4311 ) // pointer truncation from 'char *' to 'int'
|
||||
#pragma warning( disable : 4312 ) // conversion from 'unsigned int' to 'memhandle_t' of greater size
|
||||
|
@ -579,7 +579,9 @@ void ConVar_PrintDescription( const ConCommandBase *pVar );
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Utility class to quickly allow ConCommands to call member methods
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4355 )
|
||||
#endif
|
||||
|
||||
template< class T >
|
||||
class CConCommandMemberAccessor : public ConCommand, public ICommandCallback, public ICommandCompletionCallback
|
||||
@ -626,8 +628,9 @@ private:
|
||||
FnMemberCommandCompletionCallback_t m_CompletionFunc;
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning ( default : 4355 )
|
||||
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Utility macros to quicky generate a simple console command
|
||||
|
@ -21,8 +21,10 @@
|
||||
#include "tier0/memalloc.h"
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4100)
|
||||
#pragma warning (disable:4514)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -20,8 +20,10 @@
|
||||
#include "tier0/memalloc.h"
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4100)
|
||||
#pragma warning (disable:4514)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -545,8 +545,10 @@ inline I CUtlLinkedList<T,S,ML,I,M>::PrivateNext( I i ) const
|
||||
// Are nodes in the list or valid?
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning( disable: 4310 ) // Allows "(I)(S)M::INVALID_INDEX" below
|
||||
#endif
|
||||
template <class T, class S, bool ML, class I, class M>
|
||||
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() ) );
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
template <class T, class S, bool ML, class I, class M>
|
||||
inline bool CUtlLinkedList<T,S,ML,I,M>::IsValidIndex( I i ) const
|
||||
|
@ -22,9 +22,10 @@
|
||||
#include "tier0/memalloc.h"
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4100)
|
||||
#pragma warning (disable:4514)
|
||||
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -662,8 +662,10 @@ inline void CUtlRBTree<T, I, L, M>::SetColor( I i, typename CUtlRBTree<T, I, L,
|
||||
//-----------------------------------------------------------------------------
|
||||
// Allocates/ deallocates nodes
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4389) // '==' : signed/unsigned mismatch
|
||||
#endif
|
||||
template < class T, class I, typename L, class M >
|
||||
I CUtlRBTree<T, I, L, M>::NewNode()
|
||||
{
|
||||
@ -708,7 +710,9 @@ I CUtlRBTree<T, I, L, M>::NewNode()
|
||||
|
||||
return elem;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
template < class T, class I, typename L, class M >
|
||||
void CUtlRBTree<T, I, L, M>::FreeNode( I i )
|
||||
|
@ -278,9 +278,11 @@ public:
|
||||
// Especialy useful if you have a lot of vectors that are sparse, or if you're
|
||||
// carefully packing holders of vectors
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#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
|
||||
#endif
|
||||
|
||||
class CUtlVectorUltraConservativeAllocator
|
||||
{
|
||||
@ -518,7 +520,9 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -124,8 +124,10 @@ bool LessFunc_GLMTexLayoutKey( const GLMTexLayoutKey &a, const GLMTexLayoutKey &
|
||||
#define GLM_TEX_MAX_FACES 6
|
||||
#define GLM_TEX_MAX_SLICES (GLM_TEX_MAX_MIPS * GLM_TEX_MAX_FACES)
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4200 )
|
||||
#endif
|
||||
|
||||
struct GLMTexLayout
|
||||
{
|
||||
@ -148,7 +150,9 @@ struct GLMTexLayout
|
||||
GLMTexLayoutSlice m_slices[0]; // dynamically allocated 2-d array [faces][mips]
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
class CGLMTexLayoutTable
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#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: 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: 4100 ) // warning C4100: 'code' : unreferenced formal parameter
|
||||
#pragma warning( disable: 4127 ) // warning C4127: conditional expression is constant
|
||||
#endif
|
||||
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
|
@ -55,7 +55,9 @@ typedef void (Panel::*MessageFunc_t)(void);
|
||||
// Contains the information to map a string message name with parameters
|
||||
// to a function call
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable:4121)
|
||||
#endif
|
||||
struct MessageMapItem_t
|
||||
{
|
||||
const char *name;
|
||||
|
@ -11,8 +11,9 @@
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable: 4514)
|
||||
#endif
|
||||
|
||||
// First include standard libraries
|
||||
#include <stdio.h>
|
||||
|
@ -16,8 +16,10 @@
|
||||
|
||||
#define NTAB 32
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning( disable:4251 )
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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 );
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // VSTDLIB_RANDOM_H
|
||||
|
||||
|
@ -521,7 +521,9 @@ const char *KeyValues::GetName( void ) const
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Read a single token from buffer (0 terminated)
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4706)
|
||||
#endif
|
||||
const char *KeyValues::ReadToken( CUtlBuffer &buf, bool &wasQuoted, bool &wasConditional )
|
||||
{
|
||||
wasQuoted = false;
|
||||
@ -605,7 +607,9 @@ const char *KeyValues::ReadToken( CUtlBuffer &buf, bool &wasQuoted, bool &wasCon
|
||||
s_pTokenBuf[ nCount ] = 0;
|
||||
return s_pTokenBuf;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning (default:4706)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -9,7 +9,9 @@
|
||||
#include "tier1/ilocalize.h"
|
||||
#include "utlstring.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable: 4018 ) // '<' : signed/unsigned mismatch
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: converts an english string to unicode
|
||||
|
@ -6,7 +6,9 @@
|
||||
// Serialization buffer
|
||||
//===========================================================================//
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4514)
|
||||
#endif
|
||||
|
||||
#include "utlbuffer.h"
|
||||
#include <stdio.h>
|
||||
@ -904,7 +906,9 @@ void CUtlBuffer::SeekGet( SeekType_t type, int offset )
|
||||
// Parse...
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning ( disable : 4706 )
|
||||
#endif
|
||||
|
||||
int CUtlBuffer::VaScanf( const char* pFmt, va_list list )
|
||||
{
|
||||
@ -1075,7 +1079,9 @@ int CUtlBuffer::VaScanf( const char* pFmt, va_list list )
|
||||
return numScanned;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning ( default : 4706 )
|
||||
#endif
|
||||
|
||||
int CUtlBuffer::Scanf( const char* pFmt, ... )
|
||||
{
|
||||
|
@ -6,7 +6,9 @@
|
||||
// Serialization buffer
|
||||
//===========================================================================//
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable : 4514)
|
||||
#endif
|
||||
|
||||
#include "tier1/utlbufferutil.h"
|
||||
#include "tier1/utlbuffer.h"
|
||||
|
@ -6,7 +6,9 @@
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4514)
|
||||
#endif
|
||||
|
||||
#include "utlsymbol.h"
|
||||
#include "KeyValues.h"
|
||||
|
@ -8,9 +8,10 @@
|
||||
#include <windows.h>
|
||||
#include "consolewnd.h"
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#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
|
||||
#endif
|
||||
|
||||
#define EDITCONTROL_BORDER_SIZE 5
|
||||
|
||||
|
@ -13,11 +13,13 @@
|
||||
// Copyright (c) 1999-2000 Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef _WIN32
|
||||
// identifier was truncated to '255' characters in the debug information
|
||||
#pragma warning(disable: 4786)
|
||||
// conversion from 'double' to 'float'
|
||||
#pragma warning(disable: 4244)
|
||||
#pragma warning(disable: 4530)
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -39,9 +39,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable: 4142 4028)
|
||||
#endif
|
||||
#include <io.h>
|
||||
#ifdef _WIN32
|
||||
#pragma warning(default: 4142 4028)
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <direct.h>
|
||||
|
@ -1713,8 +1713,10 @@ const byte *CChromePainter::PPopupTextureDataCached()
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Client implementation of the browser handler class
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _WIN32
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
|
||||
#endif
|
||||
CClientHandler::CClientHandler( int iBrowser, const char *pchUserAgent, uint16 nSerial ) : m_Painter( this )
|
||||
{
|
||||
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_CachedVScroll, 0, sizeof( m_CachedVScroll ) );
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -3,7 +3,9 @@
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4244 ) // conversion from 'double' to 'float', possible loss of data
|
||||
#endif
|
||||
|
||||
#include <vgui/IScheme.h>
|
||||
#include <vgui/ISurface.h>
|
||||
|
@ -115,7 +115,9 @@ class BuildModeLocalizedStringEditDialog : public Frame
|
||||
|
||||
public:
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4355 )
|
||||
#endif
|
||||
BuildModeLocalizedStringEditDialog() : Frame(this, NULL)
|
||||
{
|
||||
m_pTokenEntry = new TextEntry(this, NULL);
|
||||
@ -133,7 +135,9 @@ public:
|
||||
m_pFileCombo->AddItem(g_pVGuiLocalize->GetLocalizationFileName(i), NULL);
|
||||
}
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma warning( default : 4355 )
|
||||
#endif
|
||||
|
||||
virtual void DoModal(const char *token)
|
||||
{
|
||||
|
@ -49,7 +49,9 @@ DECLARE_BUILD_FACTORY( EditablePanel );
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Constructor
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4355 )
|
||||
#endif
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning( default : 4355 )
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Destructor
|
||||
|
Loading…
Reference in New Issue
Block a user