Browse Source

Replace empty constructors with default constructors #88

optimization
nillerusr 2 years ago
parent
commit
8fbc002a37
  1. 8
      appframework/VguiMatSysApp.cpp
  2. 2
      datamodel/datamodel.h
  3. 2
      datamodel/dmelementdictionary.h
  4. 11
      dmxloader/dmxloadertext.cpp
  5. 20
      dx9sdk/include/d3dx9math.h
  6. 4
      engine/cl_demo.cpp
  7. 2
      engine/cl_demo.h
  8. 4
      engine/cmodel.cpp
  9. 10
      engine/colorcorrectionpanel.cpp
  10. 2
      engine/dispnode.h
  11. 6
      engine/dt_recv_decoder.cpp
  12. 2
      engine/dt_recv_decoder.h
  13. 4
      engine/gl_rlight.cpp
  14. 6
      engine/host_state.cpp
  15. 2
      engine/l_studio.cpp
  16. 4
      engine/pure_server.cpp
  17. 2
      engine/pure_server.h
  18. 6
      engine/spatialpartition.cpp
  19. 2
      filesystem/basefilesystem.cpp
  20. 2
      game/client/c_weapon__stubs.h
  21. 2
      game/client/cdll_client_int.cpp
  22. 2
      game/client/interpolatedvar.h
  23. 2
      game/client/movehelper_client.cpp
  24. 8
      game/client/physics.cpp
  25. 4
      game/client/view_effects.cpp
  26. 4
      game/client/viewrender.cpp
  27. 2
      game/server/ai_network.h
  28. 2
      game/server/entityoutput.h
  29. 4
      game/server/hl2/ai_behavior_holster.cpp
  30. 2
      game/server/hl2/ai_behavior_holster.h
  31. 8
      game/server/hl2/npc_metropolice.cpp
  32. 2
      game/server/hl2/npc_metropolice.h
  33. 2
      game/server/hl2/npc_monk.cpp
  34. 4
      game/shared/ModelSoundsCache.cpp
  35. 2
      game/shared/ModelSoundsCache.h
  36. 4
      game/shared/activitylist.h
  37. 4
      game/shared/cam_thirdperson.cpp
  38. 2
      game/shared/cam_thirdperson.h
  39. 4
      game/shared/decals.cpp
  40. 8
      game/shared/ehandle.h
  41. 4
      game/shared/saverestore_bitstring.h
  42. 2
      game/shared/shareddefs.h
  43. 4
      launcher/reslistgenerator.cpp
  44. 2
      materialsystem/morph.cpp
  45. 2
      materialsystem/shaderapidx9/shaderapidx8.cpp
  46. 2
      public/appframework/VguiMatSysApp.h
  47. 6
      public/bitvec.h
  48. 2
      public/bone_setup.h
  49. 6
      public/datamodel/dmattributevar.h
  50. 2
      public/datamodel/dmelementfactoryhelper.h
  51. 2
      public/disp_common.cpp
  52. 7
      public/disp_vertindex.h
  53. 2
      public/gametrace.h
  54. 6
      public/iscratchpad3d.h
  55. 2
      public/materialsystem/imaterialsystem.h
  56. 6
      public/materialsystem/imesh.h
  57. 10
      public/mathlib/compressed_vector.h
  58. 2
      public/mathlib/mathlib.h
  59. 2293
      public/mathlib/polyhedron.cpp
  60. 4
      public/mathlib/ssemath.h
  61. 66
      public/mathlib/vector.h
  62. 20
      public/mathlib/vector2d.h
  63. 22
      public/mathlib/vector4d.h
  64. 6
      public/mathlib/vplane.h
  65. 5
      public/particles/particles.h
  66. 2
      public/saverestoretypes.h
  67. 43
      public/studio.h
  68. 4
      public/tier0/basetypes.h
  69. 2
      public/tier0/dynfunction.h
  70. 2
      public/tier0/fasttimer.h
  71. 2
      public/tier0/threadtools.h
  72. 6
      public/tier0/tslist.h
  73. 2
      public/tier1/refcount.h
  74. 4
      public/tier1/utlcommon.h
  75. 7
      public/tier1/utllinkedlist.h
  76. 4
      public/tier1/utlmap.h
  77. 2
      public/tier1/utlpair.h
  78. 2
      public/tier1/utlrbtree.h
  79. 4
      public/tier1/utlsoacontainer.h
  80. 4
      public/tier1/utlsymbol.h
  81. 2
      public/tier1/utlvector.h
  82. 4
      public/tier2/p4helpers.h
  83. 2
      public/trace.h
  84. 2
      public/vcollide_parse.h
  85. 5
      public/vgui/Dar.h
  86. 2
      public/vgui/ISurface.h
  87. 2
      public/vgui_controls/HTML.h
  88. 2
      public/vphysics/constraints.h
  89. 2
      public/vphysics_interface.h
  90. 2
      public/vphysics_interfaceV30.h
  91. 4
      studiorender/flexrenderdata.h
  92. 2
      studiorender/r_studiodecal.cpp
  93. 6
      studiorender/studiorender.h
  94. 9
      tier2/p4helpers.cpp
  95. 2
      vgui2/matsys_controls/baseassetpicker.cpp
  96. 2
      vphysics/physics_environment.cpp
  97. 2
      vtf/cvtf.h

8
appframework/VguiMatSysApp.cpp

@ -28,14 +28,6 @@
#include "tier3/tier3.h" #include "tier3/tier3.h"
//-----------------------------------------------------------------------------
// Constructor
//-----------------------------------------------------------------------------
CVguiMatSysApp::CVguiMatSysApp()
{
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Create all singleton systems // Create all singleton systems
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

2
datamodel/datamodel.h

@ -377,7 +377,7 @@ private:
{ {
DmObjectId_t m_id; DmObjectId_t m_id;
DmElementReference_t m_ref; DmElementReference_t m_ref;
ElementIdHandlePair_t() {} ElementIdHandlePair_t() = default;
explicit ElementIdHandlePair_t( const DmObjectId_t &id ) : m_ref() explicit ElementIdHandlePair_t( const DmObjectId_t &id ) : m_ref()
{ {
CopyUniqueId( id, &m_id ); CopyUniqueId( id, &m_id );

2
datamodel/dmelementdictionary.h

@ -86,7 +86,7 @@ private:
{ {
DmObjectId_t m_oldId; DmObjectId_t m_oldId;
DmObjectId_t m_newId; DmObjectId_t m_newId;
DmIdPair_t() {} DmIdPair_t() = default;
DmIdPair_t( const DmObjectId_t &id ) DmIdPair_t( const DmObjectId_t &id )
{ {
CopyUniqueId( id, &m_oldId ); CopyUniqueId( id, &m_oldId );

11
dmxloader/dmxloadertext.cpp

@ -231,7 +231,7 @@ enum
class CDmxElementDictionary class CDmxElementDictionary
{ {
public: public:
CDmxElementDictionary(); CDmxElementDictionary() = default;
DmxElementDictHandle_t InsertElement( CDmxElement *pElement ); DmxElementDictHandle_t InsertElement( CDmxElement *pElement );
CDmxElement *GetElement( DmxElementDictHandle_t handle ); CDmxElement *GetElement( DmxElementDictHandle_t handle );
@ -287,15 +287,6 @@ private:
AttributeList_t m_ArrayAttributes; AttributeList_t m_ArrayAttributes;
}; };
//-----------------------------------------------------------------------------
// Constructor
//-----------------------------------------------------------------------------
CDmxElementDictionary::CDmxElementDictionary()
{
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Clears the dictionary // Clears the dictionary
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

20
dx9sdk/include/d3dx9math.h

@ -56,7 +56,7 @@ typedef struct D3DXFLOAT16
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXFLOAT16() {}; D3DXFLOAT16() = default;
D3DXFLOAT16( FLOAT ); D3DXFLOAT16( FLOAT );
D3DXFLOAT16( CONST D3DXFLOAT16& ); D3DXFLOAT16( CONST D3DXFLOAT16& );
@ -88,7 +88,7 @@ typedef struct D3DXVECTOR2
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXVECTOR2() {}; D3DXVECTOR2() = default;
D3DXVECTOR2( CONST FLOAT * ); D3DXVECTOR2( CONST FLOAT * );
D3DXVECTOR2( CONST D3DXFLOAT16 * ); D3DXVECTOR2( CONST D3DXFLOAT16 * );
D3DXVECTOR2( FLOAT x, FLOAT y ); D3DXVECTOR2( FLOAT x, FLOAT y );
@ -134,7 +134,7 @@ typedef struct D3DXVECTOR2_16F
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXVECTOR2_16F() {}; D3DXVECTOR2_16F() = default;
D3DXVECTOR2_16F( CONST FLOAT * ); D3DXVECTOR2_16F( CONST FLOAT * );
D3DXVECTOR2_16F( CONST D3DXFLOAT16 * ); D3DXVECTOR2_16F( CONST D3DXFLOAT16 * );
D3DXVECTOR2_16F( CONST D3DXFLOAT16 &x, CONST D3DXFLOAT16 &y ); D3DXVECTOR2_16F( CONST D3DXFLOAT16 &x, CONST D3DXFLOAT16 &y );
@ -162,7 +162,7 @@ public:
typedef struct D3DXVECTOR3 : public D3DVECTOR typedef struct D3DXVECTOR3 : public D3DVECTOR
{ {
public: public:
D3DXVECTOR3() {}; D3DXVECTOR3() = default;
D3DXVECTOR3( CONST FLOAT * ); D3DXVECTOR3( CONST FLOAT * );
D3DXVECTOR3( CONST D3DVECTOR& ); D3DXVECTOR3( CONST D3DVECTOR& );
D3DXVECTOR3( CONST D3DXFLOAT16 * ); D3DXVECTOR3( CONST D3DXFLOAT16 * );
@ -208,7 +208,7 @@ typedef struct D3DXVECTOR3_16F
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXVECTOR3_16F() {}; D3DXVECTOR3_16F() = default;
D3DXVECTOR3_16F( CONST FLOAT * ); D3DXVECTOR3_16F( CONST FLOAT * );
D3DXVECTOR3_16F( CONST D3DVECTOR& ); D3DXVECTOR3_16F( CONST D3DVECTOR& );
D3DXVECTOR3_16F( CONST D3DXFLOAT16 * ); D3DXVECTOR3_16F( CONST D3DXFLOAT16 * );
@ -237,7 +237,7 @@ typedef struct D3DXVECTOR4
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXVECTOR4() {}; D3DXVECTOR4() = default;
D3DXVECTOR4( CONST FLOAT* ); D3DXVECTOR4( CONST FLOAT* );
D3DXVECTOR4( CONST D3DXFLOAT16* ); D3DXVECTOR4( CONST D3DXFLOAT16* );
D3DXVECTOR4( CONST D3DVECTOR& xyz, FLOAT w ); D3DXVECTOR4( CONST D3DVECTOR& xyz, FLOAT w );
@ -281,7 +281,7 @@ typedef struct D3DXVECTOR4_16F
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXVECTOR4_16F() {}; D3DXVECTOR4_16F() = default;
D3DXVECTOR4_16F( CONST FLOAT * ); D3DXVECTOR4_16F( CONST FLOAT * );
D3DXVECTOR4_16F( CONST D3DXFLOAT16* ); D3DXVECTOR4_16F( CONST D3DXFLOAT16* );
D3DXVECTOR4_16F( CONST D3DXVECTOR3_16F& xyz, CONST D3DXFLOAT16& w ); D3DXVECTOR4_16F( CONST D3DXVECTOR3_16F& xyz, CONST D3DXFLOAT16& w );
@ -426,7 +426,7 @@ typedef struct D3DXQUATERNION
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXQUATERNION() {} D3DXQUATERNION() = default;
D3DXQUATERNION( CONST FLOAT * ); D3DXQUATERNION( CONST FLOAT * );
D3DXQUATERNION( CONST D3DXFLOAT16 * ); D3DXQUATERNION( CONST D3DXFLOAT16 * );
D3DXQUATERNION( FLOAT x, FLOAT y, FLOAT z, FLOAT w ); D3DXQUATERNION( FLOAT x, FLOAT y, FLOAT z, FLOAT w );
@ -472,7 +472,7 @@ typedef struct D3DXPLANE
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXPLANE() {} D3DXPLANE() = default;
D3DXPLANE( CONST FLOAT* ); D3DXPLANE( CONST FLOAT* );
D3DXPLANE( CONST D3DXFLOAT16* ); D3DXPLANE( CONST D3DXFLOAT16* );
D3DXPLANE( FLOAT a, FLOAT b, FLOAT c, FLOAT d ); D3DXPLANE( FLOAT a, FLOAT b, FLOAT c, FLOAT d );
@ -513,7 +513,7 @@ typedef struct D3DXCOLOR
{ {
#ifdef __cplusplus #ifdef __cplusplus
public: public:
D3DXCOLOR() {} D3DXCOLOR() = default;
D3DXCOLOR( DWORD argb ); D3DXCOLOR( DWORD argb );
D3DXCOLOR( CONST FLOAT * ); D3DXCOLOR( CONST FLOAT * );
D3DXCOLOR( CONST D3DXFLOAT16 * ); D3DXCOLOR( CONST D3DXFLOAT16 * );

4
engine/cl_demo.cpp

@ -637,10 +637,6 @@ void CDemoRecorder::StartupDemoFile( void )
g_ClientDLL->OnDemoRecordStart( m_szDemoBaseName ); g_ClientDLL->OnDemoRecordStart( m_szDemoBaseName );
} }
CDemoRecorder::CDemoRecorder()
{
}
CDemoRecorder::~CDemoRecorder() CDemoRecorder::~CDemoRecorder()
{ {
CloseDemoFile(); CloseDemoFile();

2
engine/cl_demo.h

@ -123,7 +123,7 @@ class CDemoRecorder : public IDemoRecorder
{ {
public: public:
~CDemoRecorder(); ~CDemoRecorder();
CDemoRecorder(); CDemoRecorder() = default;
CDemoFile *GetDemoFile( void ); CDemoFile *GetDemoFile( void );
int GetRecordingTick( void ); int GetRecordingTick( void );

4
engine/cmodel.cpp

@ -56,9 +56,7 @@ CTSPool<TraceInfo_t> g_TraceInfoPool;
class CTraceInfoPool : public CTSList<TraceInfo_t *> class CTraceInfoPool : public CTSList<TraceInfo_t *>
{ {
public: public:
CTraceInfoPool() CTraceInfoPool() = default;
{
}
}; };
CTraceInfoPool g_TraceInfoPool; CTraceInfoPool g_TraceInfoPool;

10
engine/colorcorrectionpanel.cpp

@ -345,7 +345,7 @@ public:
class CColorOperationList class CColorOperationList
{ {
public: public:
CColorOperationList(); CColorOperationList() = default;
// Clears the list // Clears the list
void Clear(); void Clear();
@ -376,14 +376,6 @@ private:
}; };
//-----------------------------------------------------------------------------
// Constructor
//-----------------------------------------------------------------------------
CColorOperationList::CColorOperationList()
{
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Clears the list // Clears the list
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

2
engine/dispnode.h

@ -47,7 +47,7 @@ public:
// //
// Construction/Decontruction // Construction/Decontruction
// //
CDispNode() {}; CDispNode() = default;
~CDispNode() {}; ~CDispNode() {};
//========================================================================= //=========================================================================

6
engine/dt_recv_decoder.cpp

@ -29,12 +29,6 @@ CClientSendProp::~CClientSendProp()
delete [] m_pTableName; delete [] m_pTableName;
} }
CClientSendTable::CClientSendTable()
{
}
CClientSendTable::~CClientSendTable() CClientSendTable::~CClientSendTable()
{ {
delete [] m_SendTable.m_pNetTableName; delete [] m_SendTable.m_pNetTableName;

2
engine/dt_recv_decoder.h

@ -50,7 +50,7 @@ private:
class CClientSendTable class CClientSendTable
{ {
public: public:
CClientSendTable(); CClientSendTable() = default;
~CClientSendTable(); ~CClientSendTable();
int GetNumProps() const { return m_SendTable.m_nProps; } int GetNumProps() const { return m_SendTable.m_nProps; }

4
engine/gl_rlight.cpp

@ -37,9 +37,7 @@ ConVar r_visualizelighttracesshowfulltrace( "r_visualizelighttracesshowfulltrace
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct LightVecState_t struct LightVecState_t
{ {
LightVecState_t() LightVecState_t() = default;
{
}
Ray_t m_Ray; Ray_t m_Ray;
float m_HitFrac; float m_HitFrac;
float* m_pTextureS; float* m_pTextureS;

6
engine/host_state.cpp

@ -67,7 +67,7 @@ typedef enum
class CHostState class CHostState
{ {
public: public:
CHostState(); CHostState() = default;
void Init(); void Init();
void FrameUpdate( float time ); void FrameUpdate( float time );
void SetNextState( HOSTSTATES nextState ); void SetNextState( HOSTSTATES nextState );
@ -275,10 +275,6 @@ static void WatchDogHandler()
// Class implementation // Class implementation
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
CHostState::CHostState()
{
}
void CHostState::Init() void CHostState::Init()
{ {
SetState( HS_RUN, true ); SetState( HS_RUN, true );

2
engine/l_studio.cpp

@ -1868,7 +1868,7 @@ struct ModelDebugOverlayData_t
DrawModelResults_t m_ModelResults; DrawModelResults_t m_ModelResults;
Vector m_Origin; Vector m_Origin;
ModelDebugOverlayData_t() {} ModelDebugOverlayData_t() = default;
private: private:
ModelDebugOverlayData_t( const ModelDebugOverlayData_t &vOther ); ModelDebugOverlayData_t( const ModelDebugOverlayData_t &vOther );

4
engine/pure_server.cpp

@ -26,10 +26,6 @@ extern ConVar sv_pure_consensus;
extern ConVar sv_pure_retiretime; extern ConVar sv_pure_retiretime;
extern ConVar sv_pure_trace; extern ConVar sv_pure_trace;
CPureServerWhitelist::CCommand::CCommand()
{
}
CPureServerWhitelist::CCommand::~CCommand() CPureServerWhitelist::CCommand::~CCommand()
{ {
} }

2
engine/pure_server.h

@ -69,7 +69,7 @@ private:
class CCommand class CCommand
{ {
public: public:
CCommand(); CCommand() = default;
~CCommand(); ~CCommand();
EPureServerFileClass m_eFileClass; EPureServerFileClass m_eFileClass;

6
engine/spatialpartition.cpp

@ -168,7 +168,7 @@ class CVoxelHash
{ {
public: public:
// Constructor, destructor // Constructor, destructor
CVoxelHash(); CVoxelHash() = default;
~CVoxelHash(); ~CVoxelHash();
// Call this to clear out the spatial partition and to re-initialize it given a particular world size (ISpatialPartitionInternal) // Call this to clear out the spatial partition and to re-initialize it given a particular world size (ISpatialPartitionInternal)
@ -481,10 +481,6 @@ inline CVoxelTree *CSpatialPartition::VoxelTreeForHandle( SpatialPartitionHandle
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Constructor, destructor // Constructor, destructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
CVoxelHash::CVoxelHash( )
{
}
CVoxelHash::~CVoxelHash() CVoxelHash::~CVoxelHash()
{ {
Shutdown(); Shutdown();

2
filesystem/basefilesystem.cpp

@ -227,7 +227,7 @@ CUtlVector< FileNameHandle_t > CBaseFileSystem::m_ExcludePaths;
class CStoreIDEntry class CStoreIDEntry
{ {
public: public:
CStoreIDEntry() {} CStoreIDEntry() = default;
CStoreIDEntry( const char *pPathIDStr, int storeID ) CStoreIDEntry( const char *pPathIDStr, int storeID )
{ {
m_PathIDString = pPathIDStr; m_PathIDString = pPathIDStr;

2
game/client/c_weapon__stubs.h

@ -28,7 +28,7 @@
public: \ public: \
DECLARE_PREDICTABLE(); \ DECLARE_PREDICTABLE(); \
DECLARE_CLIENTCLASS(); \ DECLARE_CLIENTCLASS(); \
C_##className() {}; \ C_##className() = default; \
private: \ private: \
C_##className( const C_##className & ); \ C_##className( const C_##className & ); \
}; \ }; \

2
game/client/cdll_client_int.cpp

@ -305,7 +305,7 @@ C_BaseEntityClassList::~C_BaseEntityClassList()
class CDataChangedEvent class CDataChangedEvent
{ {
public: public:
CDataChangedEvent() {} CDataChangedEvent() = default;
CDataChangedEvent( IClientNetworkable *ent, DataUpdateType_t updateType, int *pStoredEvent ) CDataChangedEvent( IClientNetworkable *ent, DataUpdateType_t updateType, int *pStoredEvent )
{ {
m_pEntity = ent; m_pEntity = ent;

2
game/client/interpolatedvar.h

@ -273,7 +273,7 @@ private:
template<typename Type> template<typename Type>
struct CInterpolatedVarEntryBase<Type, false> struct CInterpolatedVarEntryBase<Type, false>
{ {
CInterpolatedVarEntryBase() {} CInterpolatedVarEntryBase() = default;
~CInterpolatedVarEntryBase() {} ~CInterpolatedVarEntryBase() {}
const Type *GetValue() const { return &value; } const Type *GetValue() const { return &value; }

2
game/client/movehelper_client.cpp

@ -53,7 +53,7 @@ private:
Vector deltavelocity; Vector deltavelocity;
trace_t trace; trace_t trace;
touchlist_t() {} touchlist_t() = default;
private: private:
touchlist_t( const touchlist_t &src ); touchlist_t( const touchlist_t &src );

8
game/client/physics.cpp

@ -41,7 +41,7 @@ extern IVEngineClient *engine;
class CCollisionEvent : public IPhysicsCollisionEvent, public IPhysicsCollisionSolver, public IPhysicsObjectEvent class CCollisionEvent : public IPhysicsCollisionEvent, public IPhysicsCollisionSolver, public IPhysicsObjectEvent
{ {
public: public:
CCollisionEvent( void ); CCollisionEvent( void ) = default;
void ObjectSound( int index, vcollisionevent_t *pEvent ); void ObjectSound( int index, vcollisionevent_t *pEvent );
void PreCollision( vcollisionevent_t *pEvent ) {} void PreCollision( vcollisionevent_t *pEvent ) {}
@ -479,12 +479,6 @@ void PhysicsSimulate()
g_PhysicsSystem.PhysicsSimulate(); g_PhysicsSystem.PhysicsSimulate();
} }
CCollisionEvent::CCollisionEvent( void )
{
}
void CCollisionEvent::ObjectSound( int index, vcollisionevent_t *pEvent ) void CCollisionEvent::ObjectSound( int index, vcollisionevent_t *pEvent )
{ {
IPhysicsObject *pObject = pEvent->pObjects[index]; IPhysicsObject *pObject = pEvent->pObjects[index];

4
game/client/view_effects.cpp

@ -715,9 +715,7 @@ class CViewEffectsSaveRestoreBlockHandler : public CDefSaveRestoreBlockHandler
{ {
struct QueuedItem_t; struct QueuedItem_t;
public: public:
CViewEffectsSaveRestoreBlockHandler() CViewEffectsSaveRestoreBlockHandler() = default;
{
}
const char *GetBlockName() const char *GetBlockName()
{ {

4
game/client/viewrender.cpp

@ -259,10 +259,8 @@ private:
class CWorldListCache class CWorldListCache
{ {
public: public:
CWorldListCache() CWorldListCache() = default;
{
}
void Flush() void Flush()
{ {
for ( int i = m_Entries.FirstInorder(); i != m_Entries.InvalidIndex(); i = m_Entries.NextInorder( i ) ) for ( int i = m_Entries.FirstInorder(); i != m_Entries.InvalidIndex(); i = m_Entries.NextInorder( i ) )

2
game/server/ai_network.h

@ -52,7 +52,7 @@ public:
struct AI_NearNode_t struct AI_NearNode_t
{ {
AI_NearNode_t() {} AI_NearNode_t() = default;
AI_NearNode_t( int index, float nodedist ) { dist = nodedist; nodeIndex = index; } AI_NearNode_t( int index, float nodedist ) { dist = nodedist; nodeIndex = index; }
float dist; float dist;
int nodeIndex; int nodeIndex;

2
game/server/entityoutput.h

@ -83,7 +83,7 @@ protected:
CEventAction *m_ActionList; CEventAction *m_ActionList;
DECLARE_SIMPLE_DATADESC(); DECLARE_SIMPLE_DATADESC();
CBaseEntityOutput() {} // this class cannot be created, only it's children CBaseEntityOutput() = default; // this class cannot be created, only it's children
private: private:
CBaseEntityOutput( CBaseEntityOutput& ); // protect from accidental copying CBaseEntityOutput( CBaseEntityOutput& ); // protect from accidental copying

4
game/server/hl2/ai_behavior_holster.cpp

@ -17,10 +17,6 @@ END_DATADESC();
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
CAI_HolsterBehavior::CAI_HolsterBehavior()
{
// m_AssaultCue = CUE_NO_ASSAULT;
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

2
game/server/hl2/ai_behavior_holster.h

@ -25,7 +25,7 @@ class CAI_HolsterBehavior : public CAI_SimpleBehavior
DECLARE_CLASS( CAI_HolsterBehavior, CAI_SimpleBehavior ); DECLARE_CLASS( CAI_HolsterBehavior, CAI_SimpleBehavior );
public: public:
CAI_HolsterBehavior(); CAI_HolsterBehavior() = default;
virtual const char *GetName() { return "Holster"; } virtual const char *GetName() { return "Holster"; }

8
game/server/hl2/npc_metropolice.cpp

@ -461,14 +461,6 @@ void CNPC_MetroPolice::NotifyDeadFriend( CBaseEntity* pFriend )
m_Sentences.Speak( "METROPOLICE_MAN_DOWN", SENTENCE_PRIORITY_MEDIUM ); m_Sentences.Speak( "METROPOLICE_MAN_DOWN", SENTENCE_PRIORITY_MEDIUM );
} }
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
CNPC_MetroPolice::CNPC_MetroPolice()
{
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: // Purpose:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

2
game/server/hl2/npc_metropolice.h

@ -34,7 +34,7 @@ class CNPC_MetroPolice : public CAI_BaseActor
DECLARE_DATADESC(); DECLARE_DATADESC();
public: public:
CNPC_MetroPolice(); CNPC_MetroPolice() = default;
virtual bool CreateComponents(); virtual bool CreateComponents();
bool CreateBehaviors(); bool CreateBehaviors();

2
game/server/hl2/npc_monk.cpp

@ -37,7 +37,7 @@ class CNPC_Monk : public CAI_PlayerAlly
public: public:
CNPC_Monk() {} CNPC_Monk() = default;
void Spawn(); void Spawn();
void Precache(); void Precache();

4
game/shared/ModelSoundsCache.cpp

@ -33,10 +33,6 @@ void VerifySequenceIndex( CStudioHdr *pstudiohdr );
extern ISoundEmitterSystemBase *soundemitterbase; extern ISoundEmitterSystemBase *soundemitterbase;
CModelSoundsCache::CModelSoundsCache()
{
}
CModelSoundsCache::CModelSoundsCache( const CModelSoundsCache& src ) CModelSoundsCache::CModelSoundsCache( const CModelSoundsCache& src )
{ {
sounds = src.sounds; sounds = src.sounds;

2
game/shared/ModelSoundsCache.h

@ -23,7 +23,7 @@ class CModelSoundsCache : public IBaseCacheInfo
public: public:
CUtlVector< unsigned short > sounds; CUtlVector< unsigned short > sounds;
CModelSoundsCache(); CModelSoundsCache() = default;
CModelSoundsCache( const CModelSoundsCache& src ); CModelSoundsCache( const CModelSoundsCache& src );
void PrecacheSoundList(); void PrecacheSoundList();

4
game/shared/activitylist.h

@ -44,9 +44,7 @@ class CActivityRemapCache
{ {
public: public:
CActivityRemapCache() CActivityRemapCache() = default;
{
}
CActivityRemapCache( const CActivityRemapCache& src ) CActivityRemapCache( const CActivityRemapCache& src )
{ {

4
game/shared/cam_thirdperson.cpp

@ -51,10 +51,6 @@ ConVar cl_thirdperson( "cl_thirdperson", "0", FCVAR_NOT_CONNECTED | FCVAR_USERIN
#endif #endif
CThirdPersonManager::CThirdPersonManager( void )
{
}
void CThirdPersonManager::Init( void ) void CThirdPersonManager::Init( void )
{ {
m_bOverrideThirdPerson = false; m_bOverrideThirdPerson = false;

2
game/shared/cam_thirdperson.h

@ -41,7 +41,7 @@ class CThirdPersonManager
{ {
public: public:
CThirdPersonManager(); CThirdPersonManager() = default;
void SetCameraOffsetAngles( Vector vecOffset ) { m_vecCameraOffset = vecOffset; } void SetCameraOffsetAngles( Vector vecOffset ) { m_vecCameraOffset = vecOffset; }
Vector GetCameraOffsetAngles( void ) { return m_vecCameraOffset; } Vector GetCameraOffsetAngles( void ) { return m_vecCameraOffset; }

4
game/shared/decals.cpp

@ -62,9 +62,7 @@ private:
struct DecalEntry struct DecalEntry
{ {
DecalEntry() DecalEntry() = default;
{
}
DecalEntry( const DecalEntry& src ) DecalEntry( const DecalEntry& src )
{ {

8
game/shared/ehandle.h

@ -44,7 +44,7 @@ class CHandle : public CBaseHandle
{ {
public: public:
CHandle(); CHandle() = default;
CHandle( int iEntry, int iSerialNumber ); CHandle( int iEntry, int iSerialNumber );
CHandle( const CBaseHandle &handle ); CHandle( const CBaseHandle &handle );
CHandle( T *pVal ); CHandle( T *pVal );
@ -71,12 +71,6 @@ public:
// Inlines. // Inlines.
// ----------------------------------------------------------------------- // // ----------------------------------------------------------------------- //
template<class T>
CHandle<T>::CHandle()
{
}
template<class T> template<class T>
CHandle<T>::CHandle( int iEntry, int iSerialNumber ) CHandle<T>::CHandle( int iEntry, int iSerialNumber )
{ {

4
game/shared/saverestore_bitstring.h

@ -20,9 +20,7 @@ template <class BITSTRING>
class CVarBitVecSaveRestoreOps : public CDefSaveRestoreOps class CVarBitVecSaveRestoreOps : public CDefSaveRestoreOps
{ {
public: public:
CVarBitVecSaveRestoreOps() CVarBitVecSaveRestoreOps() = default;
{
}
// save data type interface // save data type interface
virtual void Save( const SaveRestoreFieldInfo_t &fieldInfo, ISave *pSave ) virtual void Save( const SaveRestoreFieldInfo_t &fieldInfo, ISave *pSave )

2
game/shared/shareddefs.h

@ -30,7 +30,7 @@
class CViewVectors class CViewVectors
{ {
public: public:
CViewVectors() {} CViewVectors() = default;
CViewVectors( CViewVectors(
Vector vView, Vector vView,

4
launcher/reslistgenerator.cpp

@ -112,9 +112,7 @@ void MergeResLists( CUtlVector< CUtlString > &fileNames, char const *pchOutputFi
class CWorkItem class CWorkItem
{ {
public: public:
CWorkItem() CWorkItem() = default;
{
}
CUtlString m_sSubDir; CUtlString m_sSubDir;
CUtlString m_sAddCommands; CUtlString m_sAddCommands;

2
materialsystem/morph.cpp

@ -80,7 +80,7 @@ private:
// A list of all vertices affecting a particular morph target // A list of all vertices affecting a particular morph target
struct MorphVertexList_t struct MorphVertexList_t
{ {
MorphVertexList_t() {} MorphVertexList_t() = default;
MorphVertexList_t( const MorphVertexList_t& src ) : m_nMorphTargetId( src.m_nMorphTargetId ) {} MorphVertexList_t( const MorphVertexList_t& src ) : m_nMorphTargetId( src.m_nMorphTargetId ) {}
int m_nMorphTargetId; int m_nMorphTargetId;

2
materialsystem/shaderapidx9/shaderapidx8.cpp

@ -325,7 +325,7 @@ struct DynamicState_t
bool m_bBuffer2Frames; bool m_bBuffer2Frames;
#endif #endif
DynamicState_t() {} DynamicState_t() = default;
private: private:
DynamicState_t( DynamicState_t const& ); DynamicState_t( DynamicState_t const& );

2
public/appframework/VguiMatSysApp.h

@ -30,7 +30,7 @@ class CVguiMatSysApp : public CVguiSteamApp
typedef CVguiSteamApp BaseClass; typedef CVguiSteamApp BaseClass;
public: public:
CVguiMatSysApp(); CVguiMatSysApp() = default;
// Methods of IApplication // Methods of IApplication
virtual bool Create(); virtual bool Create();

6
public/bitvec.h

@ -373,7 +373,7 @@ public:
int FindNextSetBit(int iStartBit) const; // returns -1 if no set bit was found int FindNextSetBit(int iStartBit) const; // returns -1 if no set bit was found
protected: protected:
CFixedBitVecBase() {} CFixedBitVecBase() = default;
CFixedBitVecBase(int numBits) { Assert( numBits == NUM_BITS ); } // doesn't make sense, really. Supported to simplify templates & allow easy replacement of variable CFixedBitVecBase(int numBits) { Assert( numBits == NUM_BITS ); } // doesn't make sense, really. Supported to simplify templates & allow easy replacement of variable
void ValidateOperand( const CFixedBitVecBase<NUM_BITS> &operand ) const { } // no need, compiler does so statically void ValidateOperand( const CFixedBitVecBase<NUM_BITS> &operand ) const { } // no need, compiler does so statically
@ -428,9 +428,7 @@ template < int NUM_BITS >
class CBitVec : public CBitVecT< CFixedBitVecBase<NUM_BITS> > class CBitVec : public CBitVecT< CFixedBitVecBase<NUM_BITS> >
{ {
public: public:
CBitVec() CBitVec() = default;
{
}
CBitVec(int numBits) CBitVec(int numBits)
: CBitVecT< CFixedBitVecBase<NUM_BITS> >(numBits) : CBitVecT< CFixedBitVecBase<NUM_BITS> >(numBits)

2
public/bone_setup.h

@ -249,7 +249,7 @@ struct ikcontextikrule_t
Vector kneeDir; Vector kneeDir;
Vector kneePos; Vector kneePos;
ikcontextikrule_t() {} ikcontextikrule_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed

6
public/datamodel/dmattributevar.h

@ -427,11 +427,11 @@ public:
#define DECLARE_ATTRIBUTE_ARRAY_VARIABLE( _className, _elementType ) \ #define DECLARE_ATTRIBUTE_ARRAY_VARIABLE( _className, _elementType ) \
public: \ public: \
_className() {} _className() = default;
#define DECLARE_ATTRIBUTE_ARRAY_REFERENCE( _className, _elementType ) \ #define DECLARE_ATTRIBUTE_ARRAY_REFERENCE( _className, _elementType ) \
public: \ public: \
_className() {} \ _className() = default; \
_className( CDmAttribute* pAttribute ) { BaseClass::Init( pAttribute ); } \ _className( CDmAttribute* pAttribute ) { BaseClass::Init( pAttribute ); } \
_className( CDmElement *pElement, const char *pAttributeName, bool bAddAttribute = false ) { BaseClass::Init( pElement, pAttributeName, bAddAttribute ); } \ _className( CDmElement *pElement, const char *pAttributeName, bool bAddAttribute = false ) { BaseClass::Init( pElement, pAttributeName, bAddAttribute ); } \
_className( CDmaArray<_className>& var ) { BaseClass::Init( var.GetAttribute() ); } \ _className( CDmaArray<_className>& var ) { BaseClass::Init( var.GetAttribute() ); } \
@ -439,7 +439,7 @@ public:
#define DECLARE_ATTRIBUTE_ARRAY_CONST_REFERENCE( _className, _elementType ) \ #define DECLARE_ATTRIBUTE_ARRAY_CONST_REFERENCE( _className, _elementType ) \
public: \ public: \
_className() {} \ _className() = default; \
_className( const CDmAttribute* pAttribute ) { BaseClass::Init( pAttribute ); } \ _className( const CDmAttribute* pAttribute ) { BaseClass::Init( pAttribute ); } \
_className( const CDmElement *pElement, const char *pAttributeName ) { BaseClass::Init( pElement, pAttributeName ); } \ _className( const CDmElement *pElement, const char *pAttributeName ) { BaseClass::Init( pElement, pAttributeName ); } \
_className( const CDmaArray<_className>& var ) { BaseClass::Init( var.GetAttribute() ); } \ _className( const CDmaArray<_className>& var ) { BaseClass::Init( var.GetAttribute() ); } \

2
public/datamodel/dmelementfactoryhelper.h

@ -116,7 +116,7 @@ template < class T >
class CDmAbstractElementFactory : public IDmElementFactoryInternal class CDmAbstractElementFactory : public IDmElementFactoryInternal
{ {
public: public:
CDmAbstractElementFactory() {} CDmAbstractElementFactory() = default;
// Creation, destruction // Creation, destruction
virtual CDmElement* Create( DmElementHandle_t handle, const char *pElementType, const char *pElementName, DmFileId_t fileid, const DmObjectId_t &id ) virtual CDmElement* Create( DmElementHandle_t handle, const char *pElementType, const char *pElementName, DmFileId_t fileid, const DmObjectId_t &id )

2
public/disp_common.cpp

@ -15,7 +15,7 @@
class CNodeVert class CNodeVert
{ {
public: public:
CNodeVert() {} CNodeVert() = default;
CNodeVert( int ix, int iy ) {x=ix; y=iy;} CNodeVert( int ix, int iy ) {x=ix; y=iy;}
inline int& operator[]( int i ) {return ((int*)this)[i];} inline int& operator[]( int i ) {return ((int*)this)[i];}

7
public/disp_vertindex.h

@ -22,7 +22,7 @@
class CVertIndex class CVertIndex
{ {
public: public:
CVertIndex(); CVertIndex() = default;
CVertIndex( short ix, short iy ); CVertIndex( short ix, short iy );
void Init( short ix, short iy ); void Init( short ix, short iy );
@ -62,11 +62,6 @@ inline CVertIndex BuildOffsetVertIndex(
// CVertIndex inlines. // CVertIndex inlines.
// ------------------------------------------------------------------ // // ------------------------------------------------------------------ //
inline CVertIndex::CVertIndex()
{
}
inline CVertIndex::CVertIndex( short ix, short iy ) inline CVertIndex::CVertIndex( short ix, short iy )
{ {
x = ix; x = ix;

2
public/gametrace.h

@ -72,7 +72,7 @@ public:
// Otherwise, this is the hitbox index. // Otherwise, this is the hitbox index.
int hitbox; // box hit by trace in studio int hitbox; // box hit by trace in studio
CGameTrace() {} CGameTrace() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed

6
public/iscratchpad3d.h

@ -54,7 +54,7 @@ public:
class CSPVert class CSPVert
{ {
public: public:
CSPVert(); CSPVert() = default;
CSPVert( Vector const &vPos, const CSPColor &vColor=CSPColor( Vector(1, 1, 1), 1 ) ); CSPVert( Vector const &vPos, const CSPColor &vColor=CSPColor( Vector(1, 1, 1), 1 ) );
void Init( Vector const &vPos, const CSPColor &vColor=CSPColor( Vector(1, 1, 1), 1 ) ); void Init( Vector const &vPos, const CSPColor &vColor=CSPColor( Vector(1, 1, 1), 1 ) );
@ -254,10 +254,6 @@ inline CTextParams::CTextParams()
m_flLetterWidth = 3; m_flLetterWidth = 3;
} }
inline CSPVert::CSPVert()
{
}
inline CSPVert::CSPVert( Vector const &vPos, const CSPColor &vColor ) inline CSPVert::CSPVert( Vector const &vPos, const CSPColor &vColor )
{ {
Init( vPos, vColor ); Init( vPos, vColor );

2
public/materialsystem/imaterialsystem.h

@ -1751,7 +1751,7 @@ class CMatRenderContextPtr : public CRefPtr<IMatRenderContext>
{ {
typedef CRefPtr<IMatRenderContext> BaseClass; typedef CRefPtr<IMatRenderContext> BaseClass;
public: public:
CMatRenderContextPtr() {} CMatRenderContextPtr() = default;
CMatRenderContextPtr( IMatRenderContext *pInit ) : BaseClass( pInit ) { if ( BaseClass::m_pObject ) BaseClass::m_pObject->BeginRender(); } CMatRenderContextPtr( IMatRenderContext *pInit ) : BaseClass( pInit ) { if ( BaseClass::m_pObject ) BaseClass::m_pObject->BeginRender(); }
CMatRenderContextPtr( IMaterialSystem *pFrom ) : BaseClass( pFrom->GetRenderContext() ) { if ( BaseClass::m_pObject ) BaseClass::m_pObject->BeginRender(); } CMatRenderContextPtr( IMaterialSystem *pFrom ) : BaseClass( pFrom->GetRenderContext() ) { if ( BaseClass::m_pObject ) BaseClass::m_pObject->BeginRender(); }
~CMatRenderContextPtr() { if ( BaseClass::m_pObject ) BaseClass::m_pObject->EndRender(); } ~CMatRenderContextPtr() { if ( BaseClass::m_pObject ) BaseClass::m_pObject->EndRender(); }

6
public/materialsystem/imesh.h

@ -222,17 +222,13 @@ inline void IncrementFloatPointer( float* &pBufferPointer, int vertexSize )
class CPrimList class CPrimList
{ {
public: public:
CPrimList(); CPrimList() = default;
CPrimList( int nFirstIndex, int nIndexCount ); CPrimList( int nFirstIndex, int nIndexCount );
int m_FirstIndex; int m_FirstIndex;
int m_NumIndices; int m_NumIndices;
}; };
inline CPrimList::CPrimList()
{
}
inline CPrimList::CPrimList( int nFirstIndex, int nIndexCount ) inline CPrimList::CPrimList( int nFirstIndex, int nIndexCount )
{ {
m_FirstIndex = nFirstIndex; m_FirstIndex = nFirstIndex;

10
public/mathlib/compressed_vector.h

@ -149,7 +149,7 @@ class Quaternion64
{ {
public: public:
// Construction/destruction: // Construction/destruction:
Quaternion64(void) {}; Quaternion64(void) = default;
Quaternion64(vec_t X, vec_t Y, vec_t Z); Quaternion64(vec_t X, vec_t Y, vec_t Z);
// assignment // assignment
@ -197,7 +197,7 @@ class Quaternion48
{ {
public: public:
// Construction/destruction: // Construction/destruction:
Quaternion48(void) {}; Quaternion48(void) = default;
Quaternion48(vec_t X, vec_t Y, vec_t Z); Quaternion48(vec_t X, vec_t Y, vec_t Z);
// assignment // assignment
@ -501,7 +501,7 @@ protected:
class float16_with_assign : public float16 class float16_with_assign : public float16
{ {
public: public:
float16_with_assign() {} float16_with_assign() = default;
float16_with_assign( float f ) { m_storage.rawWord = ConvertFloatTo16bits(f); } float16_with_assign( float f ) { m_storage.rawWord = ConvertFloatTo16bits(f); }
float16& operator=(const float16 &other) { m_storage.rawWord = ((float16_with_assign &)other).m_storage.rawWord; return *this; } float16& operator=(const float16 &other) { m_storage.rawWord = ((float16_with_assign &)other).m_storage.rawWord; return *this; }
@ -518,7 +518,7 @@ class Vector48
{ {
public: public:
// Construction/destruction: // Construction/destruction:
Vector48(void) {} Vector48(void) = default;
Vector48(vec_t X, vec_t Y, vec_t Z) { x.SetFloat( X ); y.SetFloat( Y ); z.SetFloat( Z ); } Vector48(vec_t X, vec_t Y, vec_t Z) { x.SetFloat( X ); y.SetFloat( Y ); z.SetFloat( Z ); }
// assignment // assignment
@ -562,7 +562,7 @@ class Vector2d32
{ {
public: public:
// Construction/destruction: // Construction/destruction:
Vector2d32(void) {} Vector2d32(void) = default;
Vector2d32(vec_t X, vec_t Y) { x.SetFloat( X ); y.SetFloat( Y ); } Vector2d32(vec_t X, vec_t Y) { x.SetFloat( X ); y.SetFloat( Y ); }
// assignment // assignment

2
public/mathlib/mathlib.h

@ -237,7 +237,7 @@ bool R_CullBoxSkipNear( const Vector& mins, const Vector& maxs, const Frustum_t
struct matrix3x4_t struct matrix3x4_t
{ {
matrix3x4_t() {} matrix3x4_t() = default;
matrix3x4_t( matrix3x4_t(
float m00, float m01, float m02, float m03, float m00, float m01, float m02, float m03,
float m10, float m11, float m12, float m13, float m10, float m11, float m12, float m13,

2293
public/mathlib/polyhedron.cpp

File diff suppressed because it is too large Load Diff

4
public/mathlib/ssemath.h

@ -2604,9 +2604,7 @@ public:
return Vector( X(idx), Y(idx), Z(idx) ); return Vector( X(idx), Y(idx), Z(idx) );
} }
FourVectors(void) FourVectors(void) = default;
{
}
FourVectors( FourVectors const &src ) FourVectors( FourVectors const &src )
{ {

66
public/mathlib/vector.h

@ -70,7 +70,17 @@ public:
vec_t x, y, z; vec_t x, y, z;
// Construction/destruction: // Construction/destruction:
Vector(void);
#if defined (_DEBUG) && defined (VECTOR_PARANOIA)
Vector(void)
{
// Initialize to NAN to catch errors
x = y = z = VEC_T_NAN;
}
#else
Vector(void) = default;
#endif
Vector(vec_t X, vec_t Y, vec_t Z); Vector(vec_t X, vec_t Y, vec_t Z);
explicit Vector(vec_t XYZ); ///< broadcast initialize explicit Vector(vec_t XYZ); ///< broadcast initialize
@ -373,7 +383,7 @@ public:
class ALIGN16 VectorAligned : public Vector class ALIGN16 VectorAligned : public Vector
{ {
public: public:
inline VectorAligned(void) {}; inline VectorAligned(void) = default;
inline VectorAligned(vec_t X, vec_t Y, vec_t Z) inline VectorAligned(vec_t X, vec_t Y, vec_t Z)
{ {
Init(X,Y,Z); Init(X,Y,Z);
@ -497,19 +507,6 @@ float RandomVectorInUnitCircle( Vector2D *pVector );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// constructors
//-----------------------------------------------------------------------------
inline Vector::Vector(void)
{
#ifdef _DEBUG
#ifdef VECTOR_PARANOIA
// Initialize to NAN to catch errors
x = y = z = VEC_T_NAN;
#endif
#endif
}
inline Vector::Vector(vec_t X, vec_t Y, vec_t Z) inline Vector::Vector(vec_t X, vec_t Y, vec_t Z)
{ {
x = X; y = Y; z = Z; x = X; y = Y; z = Z;
@ -1542,15 +1539,16 @@ class RadianEuler;
class Quaternion // same data-layout as engine's vec4_t, class Quaternion // same data-layout as engine's vec4_t,
{ // which is a vec_t[4] { // which is a vec_t[4]
public: public:
inline Quaternion(void) { #if defined (_DEBUG) && defined VECTOR_PARANOIA
inline Quaternion(void)
{
// Initialize to NAN to catch errors // Initialize to NAN to catch errors
#ifdef _DEBUG
#ifdef VECTOR_PARANOIA
x = y = z = w = VEC_T_NAN; x = y = z = w = VEC_T_NAN;
#endif
#endif
} }
#else
Quaternion(void) = default;
#endif
inline Quaternion(vec_t ix, vec_t iy, vec_t iz, vec_t iw) : x(ix), y(iy), z(iz), w(iw) { } inline Quaternion(vec_t ix, vec_t iy, vec_t iz, vec_t iw) : x(ix), y(iy), z(iz), w(iw) { }
inline Quaternion(RadianEuler const &angle); // evil auto type promotion!!! inline Quaternion(RadianEuler const &angle); // evil auto type promotion!!!
@ -1624,7 +1622,7 @@ inline bool QuaternionsAreEqual( const Quaternion& src1, const Quaternion& src2,
class ALIGN16 QuaternionAligned : public Quaternion class ALIGN16 QuaternionAligned : public Quaternion
{ {
public: public:
inline QuaternionAligned(void) {}; inline QuaternionAligned(void) = default;
inline QuaternionAligned(vec_t X, vec_t Y, vec_t Z, vec_t W) inline QuaternionAligned(vec_t X, vec_t Y, vec_t Z, vec_t W)
{ {
Init(X,Y,Z,W); Init(X,Y,Z,W);
@ -1661,7 +1659,7 @@ class QAngle;
class RadianEuler class RadianEuler
{ {
public: public:
inline RadianEuler(void) { } inline RadianEuler(void) = default;
inline RadianEuler(vec_t X, vec_t Y, vec_t Z) { x = X; y = Y; z = Z; } inline RadianEuler(vec_t X, vec_t Y, vec_t Z) { x = X; y = Y; z = Z; }
inline RadianEuler(Quaternion const &q); // evil auto type promotion!!! inline RadianEuler(Quaternion const &q); // evil auto type promotion!!!
inline RadianEuler(QAngle const &angles); // evil auto type promotion!!! inline RadianEuler(QAngle const &angles); // evil auto type promotion!!!
@ -1771,7 +1769,17 @@ public:
vec_t x, y, z; vec_t x, y, z;
// Construction/destruction // Construction/destruction
QAngle(void);
#if defined (_DEBUG) && defined (VECTOR_PARANOIA)
inline QAngle(void)
{
// Initialize to NAN to catch errors
x = y = z = VEC_T_NAN;
}
#else
QAngle(void) = default;
#endif
QAngle(vec_t X, vec_t Y, vec_t Z); QAngle(vec_t X, vec_t Y, vec_t Z);
// QAngle(RadianEuler const &angles); // evil auto type promotion!!! // QAngle(RadianEuler const &angles); // evil auto type promotion!!!
@ -1871,16 +1879,6 @@ inline void VectorMA( const QAngle &start, float scale, const QAngle &direction,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constructors // constructors
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
inline QAngle::QAngle(void)
{
#ifdef _DEBUG
#ifdef VECTOR_PARANOIA
// Initialize to NAN to catch errors
x = y = z = VEC_T_NAN;
#endif
#endif
}
inline QAngle::QAngle(vec_t X, vec_t Y, vec_t Z) inline QAngle::QAngle(vec_t X, vec_t Y, vec_t Z)
{ {
x = X; y = Y; z = Z; x = X; y = Y; z = Z;

20
public/mathlib/vector2d.h

@ -36,7 +36,16 @@ public:
vec_t x, y; vec_t x, y;
// Construction/destruction // Construction/destruction
Vector2D(void); #if defined( _DEBUG ) && defined( VECTOR_PARANOIA )
inline Vector2D(void)
{
// Initialize to NAN to catch errors
x = y = VEC_T_NAN;
}
#else
Vector2D(void) = default;
#endif
Vector2D(vec_t X, vec_t Y); Vector2D(vec_t X, vec_t Y);
Vector2D(const float *pFloat); Vector2D(const float *pFloat);
@ -194,15 +203,6 @@ void Vector2DLerp(const Vector2D& src1, const Vector2D& src2, vec_t t, Vector2D&
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constructors // constructors
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
inline Vector2D::Vector2D(void)
{
#ifdef _DEBUG
// Initialize to NAN to catch errors
x = y = VEC_T_NAN;
#endif
}
inline Vector2D::Vector2D(vec_t X, vec_t Y) inline Vector2D::Vector2D(vec_t X, vec_t Y)
{ {
x = X; y = Y; x = X; y = Y;

22
public/mathlib/vector4d.h

@ -42,7 +42,16 @@ public:
vec_t x, y, z, w; vec_t x, y, z, w;
// Construction/destruction // Construction/destruction
Vector4D(void); #if defined( _DEBUG ) && defined( VECTOR_PARANOIA )
inline Vector4D(void)
{
// Initialize to NAN to catch errors
x = y = z = w = VEC_T_NAN;
}
#else
Vector4D(void) = default;
#endif
Vector4D(vec_t X, vec_t Y, vec_t Z, vec_t W); Vector4D(vec_t X, vec_t Y, vec_t Z, vec_t W);
Vector4D(const float *pFloat); Vector4D(const float *pFloat);
@ -139,7 +148,7 @@ const Vector4D vec4_invalid( FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX );
class ALIGN16 Vector4DAligned : public Vector4D class ALIGN16 Vector4DAligned : public Vector4D
{ {
public: public:
Vector4DAligned(void) {} Vector4DAligned(void) = default;
Vector4DAligned( vec_t X, vec_t Y, vec_t Z, vec_t W ); Vector4DAligned( vec_t X, vec_t Y, vec_t Z, vec_t W );
inline void Set( vec_t X, vec_t Y, vec_t Z, vec_t W ); inline void Set( vec_t X, vec_t Y, vec_t Z, vec_t W );
@ -204,15 +213,6 @@ void Vector4DLerp(Vector4D const& src1, Vector4D const& src2, vec_t t, Vector4D&
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constructors // constructors
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
inline Vector4D::Vector4D(void)
{
#ifdef _DEBUG
// Initialize to NAN to catch errors
x = y = z = w = VEC_T_NAN;
#endif
}
inline Vector4D::Vector4D(vec_t X, vec_t Y, vec_t Z, vec_t W ) inline Vector4D::Vector4D(vec_t X, vec_t Y, vec_t Z, vec_t W )
{ {
x = X; y = Y; z = Z; w = W; x = X; y = Y; z = Z; w = W;

6
public/mathlib/vplane.h

@ -29,7 +29,7 @@ typedef int SideType;
class VPlane class VPlane
{ {
public: public:
VPlane(); VPlane() = default;
VPlane(const Vector &vNormal, vec_t dist); VPlane(const Vector &vNormal, vec_t dist);
void Init(const Vector &vNormal, vec_t dist); void Init(const Vector &vNormal, vec_t dist);
@ -77,10 +77,6 @@ private:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Inlines. // Inlines.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
inline VPlane::VPlane()
{
}
inline VPlane::VPlane(const Vector &vNormal, vec_t dist) inline VPlane::VPlane(const Vector &vNormal, vec_t dist)
{ {
m_Normal = vNormal; m_Normal = vNormal;

5
public/particles/particles.h

@ -1422,9 +1422,8 @@ public:
class CM128AttributeWriteIterator : public CStridedPtr<fltx4> class CM128AttributeWriteIterator : public CStridedPtr<fltx4>
{ {
public: public:
FORCEINLINE CM128AttributeWriteIterator( void ) FORCEINLINE CM128AttributeWriteIterator( void ) = default;
{
}
FORCEINLINE void Init ( int nAttribute, CParticleCollection *pParticles ) FORCEINLINE void Init ( int nAttribute, CParticleCollection *pParticles )
{ {
m_pData = pParticles->GetM128AttributePtrForWrite( nAttribute, &m_nStride ); m_pData = pParticles->GetM128AttributePtrForWrite( nAttribute, &m_nStride );

2
public/saverestoretypes.h

@ -278,7 +278,7 @@ private:
CHashElement( const CBaseEntity *pEntity, int index) : pEntity(pEntity), index(index) {} CHashElement( const CBaseEntity *pEntity, int index) : pEntity(pEntity), index(index) {}
CHashElement( const CBaseEntity *pEntity ) : pEntity(pEntity) {} CHashElement( const CBaseEntity *pEntity ) : pEntity(pEntity) {}
CHashElement() {} CHashElement() = default;
}; };
class CHashFuncs class CHashFuncs

43
public/studio.h

@ -147,7 +147,7 @@ struct mstudioaxisinterpbone_t
Vector pos[6]; // X+, X-, Y+, Y-, Z+, Z- Vector pos[6]; // X+, X-, Y+, Y-, Z+, Z-
Quaternion quat[6];// X+, X-, Y+, Y-, Z+, Z- Quaternion quat[6];// X+, X-, Y+, Y-, Z+, Z-
mstudioaxisinterpbone_t(){} mstudioaxisinterpbone_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioaxisinterpbone_t(const mstudioaxisinterpbone_t& vOther); mstudioaxisinterpbone_t(const mstudioaxisinterpbone_t& vOther);
@ -162,7 +162,7 @@ struct mstudioquatinterpinfo_t
Vector pos; // new position Vector pos; // new position
Quaternion quat; // new angle Quaternion quat; // new angle
mstudioquatinterpinfo_t(){} mstudioquatinterpinfo_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioquatinterpinfo_t(const mstudioquatinterpinfo_t& vOther); mstudioquatinterpinfo_t(const mstudioquatinterpinfo_t& vOther);
@ -176,7 +176,7 @@ struct mstudioquatinterpbone_t
int triggerindex; int triggerindex;
inline mstudioquatinterpinfo_t *pTrigger( int i ) const { return (mstudioquatinterpinfo_t *)(((byte *)this) + triggerindex) + i; }; inline mstudioquatinterpinfo_t *pTrigger( int i ) const { return (mstudioquatinterpinfo_t *)(((byte *)this) + triggerindex) + i; };
mstudioquatinterpbone_t(){} mstudioquatinterpbone_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioquatinterpbone_t(const mstudioquatinterpbone_t& vOther); mstudioquatinterpbone_t(const mstudioquatinterpbone_t& vOther);
@ -261,7 +261,7 @@ struct mstudioaimatbone_t
Vector upvector; Vector upvector;
Vector basepos; Vector basepos;
mstudioaimatbone_t() {} mstudioaimatbone_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioaimatbone_t(const mstudioaimatbone_t& vOther); mstudioaimatbone_t(const mstudioaimatbone_t& vOther);
@ -297,7 +297,7 @@ struct mstudiobone_t
int unused[8]; // remove as appropriate int unused[8]; // remove as appropriate
mstudiobone_t(){} mstudiobone_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudiobone_t(const mstudiobone_t& vOther); mstudiobone_t(const mstudiobone_t& vOther);
@ -339,7 +339,7 @@ struct mstudiolinearbone_t
int unused[6]; int unused[6];
mstudiolinearbone_t(){} mstudiolinearbone_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudiolinearbone_t(const mstudiolinearbone_t& vOther); mstudiolinearbone_t(const mstudiolinearbone_t& vOther);
@ -370,7 +370,7 @@ struct mstudioboneflexdrivercontrol_t
float m_flMin; // Min value of bone component mapped to 0 on flex controller float m_flMin; // Min value of bone component mapped to 0 on flex controller
float m_flMax; // Max value of bone component mapped to 1 on flex controller float m_flMax; // Max value of bone component mapped to 1 on flex controller
mstudioboneflexdrivercontrol_t(){} mstudioboneflexdrivercontrol_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioboneflexdrivercontrol_t( const mstudioboneflexdrivercontrol_t &vOther ); mstudioboneflexdrivercontrol_t( const mstudioboneflexdrivercontrol_t &vOther );
@ -396,7 +396,7 @@ struct mstudioboneflexdriver_t
int unused[3]; int unused[3];
mstudioboneflexdriver_t(){} mstudioboneflexdriver_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioboneflexdriver_t( const mstudioboneflexdriver_t &vOther ); mstudioboneflexdriver_t( const mstudioboneflexdriver_t &vOther );
@ -468,7 +468,7 @@ struct mstudiobbox_t
return ((const char*)this) + szhitboxnameindex; return ((const char*)this) + szhitboxnameindex;
} }
mstudiobbox_t() {} mstudiobbox_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
@ -532,7 +532,7 @@ struct mstudioikerror_t
Vector pos; Vector pos;
Quaternion q; Quaternion q;
mstudioikerror_t() {} mstudioikerror_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
@ -547,7 +547,7 @@ struct mstudiocompressedikerror_t
float scale[6]; float scale[6];
short offset[6]; short offset[6];
inline mstudioanimvalue_t *pAnimvalue( int i ) const { if (offset[i] > 0) return (mstudioanimvalue_t *)(((byte *)this) + offset[i]); else return NULL; }; inline mstudioanimvalue_t *pAnimvalue( int i ) const { if (offset[i] > 0) return (mstudioanimvalue_t *)(((byte *)this) + offset[i]); else return NULL; };
mstudiocompressedikerror_t(){} mstudiocompressedikerror_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
@ -598,7 +598,7 @@ struct mstudioikrule_t
int unused[7]; int unused[7];
mstudioikrule_t() {} mstudioikrule_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
@ -699,7 +699,8 @@ struct mstudiomovement_t
Vector vector; // movement vector relative to this blocks initial angle Vector vector; // movement vector relative to this blocks initial angle
Vector position; // relative to start of animation??? Vector position; // relative to start of animation???
mstudiomovement_t(){} mstudiomovement_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudiomovement_t(const mstudiomovement_t& vOther); mstudiomovement_t(const mstudiomovement_t& vOther);
@ -768,7 +769,7 @@ struct mstudioanimdesc_t
byte *pZeroFrameData( ) const { if (zeroframeindex) return (((byte *)this) + zeroframeindex); else return NULL; }; byte *pZeroFrameData( ) const { if (zeroframeindex) return (((byte *)this) + zeroframeindex); else return NULL; };
mutable float zeroframestalltime; // saved during read stalls mutable float zeroframestalltime; // saved during read stalls
mstudioanimdesc_t(){} mstudioanimdesc_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioanimdesc_t(const mstudioanimdesc_t& vOther); mstudioanimdesc_t(const mstudioanimdesc_t& vOther);
@ -900,7 +901,7 @@ struct mstudioseqdesc_t
int unused[5]; // remove/add as appropriate (grow back to 8 ints on version change!) int unused[5]; // remove/add as appropriate (grow back to 8 ints on version change!)
mstudioseqdesc_t(){} mstudioseqdesc_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioseqdesc_t(const mstudioseqdesc_t& vOther); mstudioseqdesc_t(const mstudioseqdesc_t& vOther);
@ -1100,7 +1101,7 @@ public:
}; };
friend class CSortByIndex; friend class CSortByIndex;
mstudiovertanim_t(){} mstudiovertanim_t() = default;
//private: //private:
// No copy constructors allowed, but it's needed for std::sort() // No copy constructors allowed, but it's needed for std::sort()
// mstudiovertanim_t(const mstudiovertanim_t& vOther); // mstudiovertanim_t(const mstudiovertanim_t& vOther);
@ -1211,7 +1212,7 @@ struct mstudiovertex_t
Vector m_vecNormal; Vector m_vecNormal;
Vector2D m_vecTexCoord; Vector2D m_vecTexCoord;
mstudiovertex_t() {} mstudiovertex_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
@ -1269,7 +1270,7 @@ struct mstudioeyeball_t
char unused3[3]; char unused3[3];
int unused4[7]; int unused4[7];
mstudioeyeball_t(){} mstudioeyeball_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioeyeball_t(const mstudioeyeball_t& vOther); mstudioeyeball_t(const mstudioeyeball_t& vOther);
@ -1284,7 +1285,7 @@ struct mstudioiklink_t
Vector kneeDir; // ideal bending direction (per link, if applicable) Vector kneeDir; // ideal bending direction (per link, if applicable)
Vector unused0; // unused Vector unused0; // unused
mstudioiklink_t(){} mstudioiklink_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudioiklink_t(const mstudioiklink_t& vOther); mstudioiklink_t(const mstudioiklink_t& vOther);
@ -1411,7 +1412,7 @@ struct mstudiomesh_t
int unused[8]; // remove as appropriate int unused[8]; // remove as appropriate
#endif #endif
mstudiomesh_t(){} mstudiomesh_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudiomesh_t(const mstudiomesh_t& vOther); mstudiomesh_t(const mstudiomesh_t& vOther);
@ -1697,7 +1698,7 @@ struct mstudiomouth_t
Vector forward; Vector forward;
int flexdesc; int flexdesc;
mstudiomouth_t(){} mstudiomouth_t() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed
mstudiomouth_t(const mstudiomouth_t& vOther); mstudiomouth_t(const mstudiomouth_t& vOther);

4
public/tier0/basetypes.h

@ -325,7 +325,7 @@ template< class DummyType >
class CIntHandle16 : public CBaseIntHandle< unsigned short > class CIntHandle16 : public CBaseIntHandle< unsigned short >
{ {
public: public:
inline CIntHandle16() {} inline CIntHandle16() = default;
static inline CIntHandle16<DummyType> MakeHandle( HANDLE_TYPE val ) static inline CIntHandle16<DummyType> MakeHandle( HANDLE_TYPE val )
{ {
@ -344,7 +344,7 @@ template< class DummyType >
class CIntHandle32 : public CBaseIntHandle< unsigned long > class CIntHandle32 : public CBaseIntHandle< unsigned long >
{ {
public: public:
inline CIntHandle32() {} inline CIntHandle32() = default;
static inline CIntHandle32<DummyType> MakeHandle( HANDLE_TYPE val ) static inline CIntHandle32<DummyType> MakeHandle( HANDLE_TYPE val )
{ {

2
public/tier0/dynfunction.h

@ -118,7 +118,7 @@ template < class FunctionType >
class CDynamicFunctionMustInit : public CDynamicFunction < FunctionType > class CDynamicFunctionMustInit : public CDynamicFunction < FunctionType >
{ {
private: // forbid default constructor. private: // forbid default constructor.
CDynamicFunctionMustInit() {} CDynamicFunctionMustInit() = default;
public: public:
CDynamicFunctionMustInit(const char *libname, const char *fn, FunctionType fallback=NULL) CDynamicFunctionMustInit(const char *libname, const char *fn, FunctionType fallback=NULL)

2
public/tier0/fasttimer.h

@ -494,7 +494,7 @@ inline CAverageTimeMarker::~CAverageTimeMarker()
class CLimitTimer class CLimitTimer
{ {
public: public:
CLimitTimer() {} CLimitTimer() = default;
CLimitTimer( uint64 cMicroSecDuration ) { SetLimit( cMicroSecDuration ); } CLimitTimer( uint64 cMicroSecDuration ) { SetLimit( cMicroSecDuration ); }
void SetLimit( uint64 m_cMicroSecDuration ); void SetLimit( uint64 m_cMicroSecDuration );
bool BLimitReached() const; bool BLimitReached() const;

2
public/tier0/threadtools.h

@ -609,7 +609,7 @@ private:
class CThreadLocalPtr : private CThreadLocalBase class CThreadLocalPtr : private CThreadLocalBase
{ {
public: public:
CThreadLocalPtr() {} CThreadLocalPtr() = default;
operator const void *() const { return (const T *)Get(); } operator const void *() const { return (const T *)Get(); }
operator void *() { return (T *)Get(); } operator void *() { return (T *)Get(); }

6
public/tier0/tslist.h

@ -433,7 +433,7 @@ class TSLIST_HEAD_ALIGN CTSList : public CTSListBase
public: public:
struct TSLIST_NODE_ALIGN Node_t : public TSLNodeBase_t struct TSLIST_NODE_ALIGN Node_t : public TSLNodeBase_t
{ {
Node_t() {} Node_t() = default;
Node_t( const T &init ) : elem( init ) {} Node_t( const T &init ) : elem( init ) {}
T elem; T elem;
@ -524,7 +524,7 @@ class TSLIST_HEAD_ALIGN CTSListWithFreeList : public CTSListBase
public: public:
struct TSLIST_NODE_ALIGN Node_t : public TSLNodeBase_t struct TSLIST_NODE_ALIGN Node_t : public TSLNodeBase_t
{ {
Node_t() {} Node_t() = default;
Node_t( const T &init ) : elem( init ) {} Node_t( const T &init ) : elem( init ) {}
T elem; T elem;
@ -692,7 +692,7 @@ public:
MemAlloc_FreeAligned( p ); MemAlloc_FreeAligned( p );
} }
Node_t() {} Node_t() = default;
Node_t( const T &init ) : elem( init ) {} Node_t( const T &init ) : elem( init ) {}
Node_t *pNext; Node_t *pNext;

2
public/tier1/refcount.h

@ -167,7 +167,7 @@ class CRefPtr : public CBaseAutoPtr<T>
{ {
typedef CBaseAutoPtr<T> BaseClass; typedef CBaseAutoPtr<T> BaseClass;
public: public:
CRefPtr() {} CRefPtr() = default;
CRefPtr( T *pInit ) : BaseClass( pInit ) {} CRefPtr( T *pInit ) : BaseClass( pInit ) {}
CRefPtr( const CRefPtr<T> &from ) : BaseClass( from ) {} CRefPtr( const CRefPtr<T> &from ) : BaseClass( from ) {}
~CRefPtr() { if ( BaseClass::m_pObject ) BaseClass::m_pObject->Release(); } ~CRefPtr() { if ( BaseClass::m_pObject ) BaseClass::m_pObject->Release(); }

4
public/tier1/utlcommon.h

@ -57,7 +57,7 @@ public:
K m_key; K m_key;
V m_value; V m_value;
CUtlKeyValuePair() {} CUtlKeyValuePair() = default;
template < typename KInit > template < typename KInit >
explicit CUtlKeyValuePair( const KInit &k ) : m_key( k ) {} explicit CUtlKeyValuePair( const KInit &k ) : m_key( k ) {}
@ -76,7 +76,7 @@ public:
typedef const K ValueReturn_t; typedef const K ValueReturn_t;
K m_key; K m_key;
CUtlKeyValuePair() {} CUtlKeyValuePair() = default;
template < typename KInit > template < typename KInit >
explicit CUtlKeyValuePair( const KInit &k ) : m_key( k ) {} explicit CUtlKeyValuePair( const KInit &k ) : m_key( k ) {}

7
public/tier1/utllinkedlist.h

@ -257,9 +257,8 @@ public:
typedef _CUtlLinkedList_constiterator_t< List_t > Base; typedef _CUtlLinkedList_constiterator_t< List_t > Base;
// Default constructor -- gives a currently unusable iterator. // Default constructor -- gives a currently unusable iterator.
_CUtlLinkedList_iterator_t() _CUtlLinkedList_iterator_t() = default;
{
}
// Normal constructor. // Normal constructor.
_CUtlLinkedList_iterator_t( const List_t& list, IndexType_t index ) _CUtlLinkedList_iterator_t( const List_t& list, IndexType_t index )
: _CUtlLinkedList_constiterator_t< List_t >( list, index ) : _CUtlLinkedList_constiterator_t< List_t >( list, index )
@ -1231,7 +1230,7 @@ private:
struct Node_t struct Node_t
{ {
Node_t() {} Node_t() = default;
Node_t( const T &_elem ) : elem( _elem ) {} Node_t( const T &_elem ) : elem( _elem ) {}
T elem; T elem;

4
public/tier1/utlmap.h

@ -175,9 +175,7 @@ public:
struct Node_t struct Node_t
{ {
Node_t() Node_t() = default;
{
}
Node_t( const Node_t &from ) Node_t( const Node_t &from )
: key( from.key ), : key( from.key ),

2
public/tier1/utlpair.h

@ -17,7 +17,7 @@ template<typename T1, typename T2>
class CUtlPair class CUtlPair
{ {
public: public:
CUtlPair() {} CUtlPair() = default;
CUtlPair( T1 t1, T2 t2 ) : first( t1 ), second( t2 ) {} CUtlPair( T1 t1, T2 t2 ) : first( t1 ), second( t2 ) {}
bool operator<( const CUtlPair<T1,T2> &rhs ) const { bool operator<( const CUtlPair<T1,T2> &rhs ) const {

2
public/tier1/utlrbtree.h

@ -32,7 +32,7 @@ template <typename T>
class CDefLess class CDefLess
{ {
public: public:
CDefLess() {} CDefLess() = default;
CDefLess( int i ) {} CDefLess( int i ) {}
inline bool operator()( const T &lhs, const T &rhs ) const { return ( lhs < rhs ); } inline bool operator()( const T &lhs, const T &rhs ) const { return ( lhs < rhs ); }
inline bool operator!() const { return false; } inline bool operator!() const { return false; }

4
public/tier1/utlsoacontainer.h

@ -39,7 +39,7 @@ public:
m_nStride = nByteStride / sizeof( T ); m_nStride = nByteStride / sizeof( T );
} }
FORCEINLINE CStridedPtr<T>( void ) {} FORCEINLINE CStridedPtr<T>( void ) = default;
T *operator->(void) const T *operator->(void) const
{ {
return m_pData; return m_pData;
@ -81,7 +81,7 @@ public:
m_nStride = nByteStride / sizeof( T ); m_nStride = nByteStride / sizeof( T );
} }
FORCEINLINE CStridedConstPtr<T>( void ) {} FORCEINLINE CStridedConstPtr<T>( void ) = default;
const T *operator->(void) const const T *operator->(void) const
{ {

4
public/tier1/utlsymbol.h

@ -138,9 +138,7 @@ protected:
class CStringPoolIndex class CStringPoolIndex
{ {
public: public:
inline CStringPoolIndex() inline CStringPoolIndex() = default;
{
}
inline CStringPoolIndex( unsigned short iPool, unsigned short iOffset ) inline CStringPoolIndex( unsigned short iPool, unsigned short iOffset )
: m_iPool(iPool), m_iOffset(iOffset) : m_iPool(iPool), m_iOffset(iOffset)

2
public/tier1/utlvector.h

@ -1487,7 +1487,7 @@ public:
return strcmp( *sz1, *sz2 ); return strcmp( *sz1, *sz2 );
} }
CUtlStringList(){} CUtlStringList() = default;
CUtlStringList( char const *pString, char const *pSeparator ) CUtlStringList( char const *pString, char const *pSeparator )
{ {

4
public/tier2/p4helpers.h

@ -69,9 +69,7 @@ public:
class CP4Factory class CP4Factory
{ {
public: public:
CP4Factory(); CP4Factory() = default;
~CP4Factory();
public: public:
// Sets whether dummy objects are created by the factory. // Sets whether dummy objects are created by the factory.
// Returns the old state of the dummy mode. // Returns the old state of the dummy mode.

2
public/trace.h

@ -59,7 +59,7 @@ public:
bool allsolid; // if true, plane is not valid bool allsolid; // if true, plane is not valid
bool startsolid; // if true, the initial point was in a solid area bool startsolid; // if true, the initial point was in a solid area
CBaseTrace() {} CBaseTrace() = default;
private: private:
// No copy constructors allowed // No copy constructors allowed

2
public/vcollide_parse.h

@ -30,7 +30,7 @@ struct fluid_t
fluidparams_t params; fluidparams_t params;
fluid_t() {} fluid_t() = default;
fluid_t( fluid_t const& src ) : params(src.params) fluid_t( fluid_t const& src ) : params(src.params)
{ {
index = src.index; index = src.index;

5
public/vgui/Dar.h

@ -30,9 +30,8 @@ template<class ELEMTYPE> class Dar : public CUtlVector< ELEMTYPE >
typedef CUtlVector< ELEMTYPE > BaseClass; typedef CUtlVector< ELEMTYPE > BaseClass;
public: public:
Dar() Dar() = default;
{
}
Dar(int initialCapacity) : Dar(int initialCapacity) :
BaseClass( 0, initialCapacity ) BaseClass( 0, initialCapacity )
{ {

2
public/vgui/ISurface.h

@ -51,7 +51,7 @@ typedef unsigned long HFont;
struct Vertex_t struct Vertex_t
{ {
Vertex_t() {} Vertex_t() = default;
Vertex_t( const Vector2D &pos, const Vector2D &coord = Vector2D( 0, 0 ) ) Vertex_t( const Vector2D &pos, const Vector2D &coord = Vector2D( 0, 0 ) )
{ {
m_Position = pos; m_Position = pos;

2
public/vgui_controls/HTML.h

@ -301,7 +301,7 @@ private:
struct CustomCursorCache_t struct CustomCursorCache_t
{ {
CustomCursorCache_t() {} CustomCursorCache_t() = default;
CustomCursorCache_t( const void *pchData ) { m_pchData = pchData; } CustomCursorCache_t( const void *pchData ) { m_pchData = pchData; }
float m_CacheTime; // the time we cached the cursor float m_CacheTime; // the time we cached the cursor
CursorCode m_Cursor; // the vgui handle to it CursorCode m_Cursor; // the vgui handle to it

2
public/vphysics/constraints.h

@ -148,7 +148,7 @@ struct constraint_limitedhingeparams_t : public constraint_hingeparams_t
Vector referencePerpAxisDirection; // unit direction vector vector perpendicular to the hinge axis in world space Vector referencePerpAxisDirection; // unit direction vector vector perpendicular to the hinge axis in world space
Vector attachedPerpAxisDirection; // unit direction vector vector perpendicular to the hinge axis in world space Vector attachedPerpAxisDirection; // unit direction vector vector perpendicular to the hinge axis in world space
constraint_limitedhingeparams_t() {} constraint_limitedhingeparams_t() = default;
constraint_limitedhingeparams_t( const constraint_hingeparams_t &hinge ) constraint_limitedhingeparams_t( const constraint_hingeparams_t &hinge )
{ {
static_cast<constraint_hingeparams_t &>(*this) = hinge; static_cast<constraint_hingeparams_t &>(*this) = hinge;

2
public/vphysics_interface.h

@ -1021,7 +1021,7 @@ struct fluidparams_t
bool useAerodynamics;// true if this controller should calculate surface pressure bool useAerodynamics;// true if this controller should calculate surface pressure
int contents; int contents;
fluidparams_t() {} fluidparams_t() = default;
fluidparams_t( fluidparams_t const& src ) fluidparams_t( fluidparams_t const& src )
{ {
Vector4DCopy( src.surfacePlane, surfacePlane ); Vector4DCopy( src.surfacePlane, surfacePlane );

2
public/vphysics_interfaceV30.h

@ -930,7 +930,7 @@ struct fluidparams_t
bool useAerodynamics;// true if this controller should calculate surface pressure bool useAerodynamics;// true if this controller should calculate surface pressure
int contents; int contents;
fluidparams_t() {} fluidparams_t() = default;
fluidparams_t( fluidparams_t const& src ) fluidparams_t( fluidparams_t const& src )
{ {
Vector4DCopy( src.surfacePlane, surfacePlane ); Vector4DCopy( src.surfacePlane, surfacePlane );

4
studiorender/flexrenderdata.h

@ -31,7 +31,7 @@ struct CachedPosNormTan_t
Vector m_Normal; Vector m_Normal;
Vector4D m_TangentS; Vector4D m_TangentS;
CachedPosNormTan_t() {} CachedPosNormTan_t() = default;
CachedPosNormTan_t( CachedPosNormTan_t const& src ) CachedPosNormTan_t( CachedPosNormTan_t const& src )
{ {
@ -51,7 +51,7 @@ struct CachedPosNorm_t
Vector4DAligned m_Position; Vector4DAligned m_Position;
Vector4DAligned m_Normal; Vector4DAligned m_Normal;
CachedPosNorm_t() {} CachedPosNorm_t() = default;
CachedPosNorm_t( CachedPosNorm_t const& src ) CachedPosNorm_t( CachedPosNorm_t const& src )
{ {

2
studiorender/r_studiodecal.cpp

@ -61,7 +61,7 @@ struct DecalClipState_t
// Union of the decal triangle clip flags above for each vert // Union of the decal triangle clip flags above for each vert
int m_ClipFlags[16]; int m_ClipFlags[16];
DecalClipState_t() {} DecalClipState_t() = default;
private: private:
// Copy constructors are not allowed // Copy constructors are not allowed

6
studiorender/studiorender.h

@ -86,7 +86,7 @@ struct lightpos_t
float falloff; // light distance falloff float falloff; // light distance falloff
float dot; // light direction * delta; float dot; // light direction * delta;
lightpos_t() {} lightpos_t() = default;
private: private:
// Copy constructors are not allowed // Copy constructors are not allowed
@ -106,7 +106,7 @@ struct eyeballstate_t
Vector cornea; // world center of cornea Vector cornea; // world center of cornea
eyeballstate_t() {} eyeballstate_t() = default;
private: private:
// Copy constructors are not allowed // Copy constructors are not allowed
@ -170,7 +170,7 @@ struct DecalVertex_t
unsigned short m_Group; unsigned short m_Group;
#endif #endif
DecalVertex_t() {} DecalVertex_t() = default;
DecalVertex_t( const DecalVertex_t& src ) DecalVertex_t( const DecalVertex_t& src )
{ {
m_Position = src.m_Position; m_Position = src.m_Position;

9
tier2/p4helpers.cpp

@ -103,15 +103,6 @@ bool CP4File::SetFileType(const CUtlString& desiredFileType)
// //
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
CP4Factory::CP4Factory()
{
}
CP4Factory::~CP4Factory()
{
}
bool CP4Factory::SetDummyMode( bool bDummyMode ) bool CP4Factory::SetDummyMode( bool bDummyMode )
{ {
bool bOld = m_bDummyMode; bool bOld = m_bDummyMode;

2
vgui2/matsys_controls/baseassetpicker.cpp

@ -408,7 +408,7 @@ private:
struct CachedAssetList_t struct CachedAssetList_t
{ {
CachedAssetList_t() {} CachedAssetList_t() = default;
CachedAssetList_t( const char *pSearchSubDir, int nExtCount, const char **ppSearchExt ) : CachedAssetList_t( const char *pSearchSubDir, int nExtCount, const char **ppSearchExt ) :
m_pSubDir( pSearchSubDir, Q_strlen( pSearchSubDir ) + 1 ) m_pSubDir( pSearchSubDir, Q_strlen( pSearchSubDir ) + 1 )
{ {

2
vphysics/physics_environment.cpp

@ -683,7 +683,7 @@ private:
struct corepair_t struct corepair_t
{ {
corepair_t() {} corepair_t() = default;
corepair_t( IVP_Friction_Core_Pair *pair ) corepair_t( IVP_Friction_Core_Pair *pair )
{ {
int index = ( pair->objs[0] < pair->objs[1] ) ? 0 : 1; int index = ( pair->objs[0] < pair->objs[1] ) ? 0 : 1;

2
vtf/cvtf.h

@ -21,7 +21,7 @@
class CEdgePos class CEdgePos
{ {
public: public:
CEdgePos() {} CEdgePos() = default;
CEdgePos( int ix, int iy ) CEdgePos( int ix, int iy )
{ {
x = ix; x = ix;

Loading…
Cancel
Save