Skip to content

Commit 8fbc002

Browse files
committed
Replace empty constructors with default constructors #88
1 parent ba90de2 commit 8fbc002

File tree

97 files changed

+192
-2620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+192
-2620
lines changed

appframework/VguiMatSysApp.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@
2828
#include "tier3/tier3.h"
2929

3030

31-
//-----------------------------------------------------------------------------
32-
// Constructor
33-
//-----------------------------------------------------------------------------
34-
CVguiMatSysApp::CVguiMatSysApp()
35-
{
36-
}
37-
38-
3931
//-----------------------------------------------------------------------------
4032
// Create all singleton systems
4133
//-----------------------------------------------------------------------------

datamodel/datamodel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ class CDataModel : public CBaseAppSystem< IDataModel >
377377
{
378378
DmObjectId_t m_id;
379379
DmElementReference_t m_ref;
380-
ElementIdHandlePair_t() {}
380+
ElementIdHandlePair_t() = default;
381381
explicit ElementIdHandlePair_t( const DmObjectId_t &id ) : m_ref()
382382
{
383383
CopyUniqueId( id, &m_id );

datamodel/dmelementdictionary.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class CDmElementDictionary
8686
{
8787
DmObjectId_t m_oldId;
8888
DmObjectId_t m_newId;
89-
DmIdPair_t() {}
89+
DmIdPair_t() = default;
9090
DmIdPair_t( const DmObjectId_t &id )
9191
{
9292
CopyUniqueId( id, &m_oldId );

dmxloader/dmxloadertext.cpp

+1-10
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ enum
231231
class CDmxElementDictionary
232232
{
233233
public:
234-
CDmxElementDictionary();
234+
CDmxElementDictionary() = default;
235235

236236
DmxElementDictHandle_t InsertElement( CDmxElement *pElement );
237237
CDmxElement *GetElement( DmxElementDictHandle_t handle );
@@ -287,15 +287,6 @@ class CDmxElementDictionary
287287
AttributeList_t m_ArrayAttributes;
288288
};
289289

290-
291-
//-----------------------------------------------------------------------------
292-
// Constructor
293-
//-----------------------------------------------------------------------------
294-
CDmxElementDictionary::CDmxElementDictionary()
295-
{
296-
}
297-
298-
299290
//-----------------------------------------------------------------------------
300291
// Clears the dictionary
301292
//-----------------------------------------------------------------------------

dx9sdk/include/d3dx9math.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ typedef struct D3DXFLOAT16
5656
{
5757
#ifdef __cplusplus
5858
public:
59-
D3DXFLOAT16() {};
59+
D3DXFLOAT16() = default;
6060
D3DXFLOAT16( FLOAT );
6161
D3DXFLOAT16( CONST D3DXFLOAT16& );
6262

@@ -88,7 +88,7 @@ typedef struct D3DXVECTOR2
8888
{
8989
#ifdef __cplusplus
9090
public:
91-
D3DXVECTOR2() {};
91+
D3DXVECTOR2() = default;
9292
D3DXVECTOR2( CONST FLOAT * );
9393
D3DXVECTOR2( CONST D3DXFLOAT16 * );
9494
D3DXVECTOR2( FLOAT x, FLOAT y );
@@ -134,7 +134,7 @@ typedef struct D3DXVECTOR2_16F
134134
{
135135
#ifdef __cplusplus
136136
public:
137-
D3DXVECTOR2_16F() {};
137+
D3DXVECTOR2_16F() = default;
138138
D3DXVECTOR2_16F( CONST FLOAT * );
139139
D3DXVECTOR2_16F( CONST D3DXFLOAT16 * );
140140
D3DXVECTOR2_16F( CONST D3DXFLOAT16 &x, CONST D3DXFLOAT16 &y );
@@ -162,7 +162,7 @@ typedef struct D3DXVECTOR2_16F
162162
typedef struct D3DXVECTOR3 : public D3DVECTOR
163163
{
164164
public:
165-
D3DXVECTOR3() {};
165+
D3DXVECTOR3() = default;
166166
D3DXVECTOR3( CONST FLOAT * );
167167
D3DXVECTOR3( CONST D3DVECTOR& );
168168
D3DXVECTOR3( CONST D3DXFLOAT16 * );
@@ -208,7 +208,7 @@ typedef struct D3DXVECTOR3_16F
208208
{
209209
#ifdef __cplusplus
210210
public:
211-
D3DXVECTOR3_16F() {};
211+
D3DXVECTOR3_16F() = default;
212212
D3DXVECTOR3_16F( CONST FLOAT * );
213213
D3DXVECTOR3_16F( CONST D3DVECTOR& );
214214
D3DXVECTOR3_16F( CONST D3DXFLOAT16 * );
@@ -237,7 +237,7 @@ typedef struct D3DXVECTOR4
237237
{
238238
#ifdef __cplusplus
239239
public:
240-
D3DXVECTOR4() {};
240+
D3DXVECTOR4() = default;
241241
D3DXVECTOR4( CONST FLOAT* );
242242
D3DXVECTOR4( CONST D3DXFLOAT16* );
243243
D3DXVECTOR4( CONST D3DVECTOR& xyz, FLOAT w );
@@ -281,7 +281,7 @@ typedef struct D3DXVECTOR4_16F
281281
{
282282
#ifdef __cplusplus
283283
public:
284-
D3DXVECTOR4_16F() {};
284+
D3DXVECTOR4_16F() = default;
285285
D3DXVECTOR4_16F( CONST FLOAT * );
286286
D3DXVECTOR4_16F( CONST D3DXFLOAT16* );
287287
D3DXVECTOR4_16F( CONST D3DXVECTOR3_16F& xyz, CONST D3DXFLOAT16& w );
@@ -426,7 +426,7 @@ typedef struct D3DXQUATERNION
426426
{
427427
#ifdef __cplusplus
428428
public:
429-
D3DXQUATERNION() {}
429+
D3DXQUATERNION() = default;
430430
D3DXQUATERNION( CONST FLOAT * );
431431
D3DXQUATERNION( CONST D3DXFLOAT16 * );
432432
D3DXQUATERNION( FLOAT x, FLOAT y, FLOAT z, FLOAT w );
@@ -472,7 +472,7 @@ typedef struct D3DXPLANE
472472
{
473473
#ifdef __cplusplus
474474
public:
475-
D3DXPLANE() {}
475+
D3DXPLANE() = default;
476476
D3DXPLANE( CONST FLOAT* );
477477
D3DXPLANE( CONST D3DXFLOAT16* );
478478
D3DXPLANE( FLOAT a, FLOAT b, FLOAT c, FLOAT d );
@@ -513,7 +513,7 @@ typedef struct D3DXCOLOR
513513
{
514514
#ifdef __cplusplus
515515
public:
516-
D3DXCOLOR() {}
516+
D3DXCOLOR() = default;
517517
D3DXCOLOR( DWORD argb );
518518
D3DXCOLOR( CONST FLOAT * );
519519
D3DXCOLOR( CONST D3DXFLOAT16 * );

engine/cl_demo.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,6 @@ void CDemoRecorder::StartupDemoFile( void )
637637
g_ClientDLL->OnDemoRecordStart( m_szDemoBaseName );
638638
}
639639

640-
CDemoRecorder::CDemoRecorder()
641-
{
642-
}
643-
644640
CDemoRecorder::~CDemoRecorder()
645641
{
646642
CloseDemoFile();

engine/cl_demo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class CDemoRecorder : public IDemoRecorder
123123
{
124124
public:
125125
~CDemoRecorder();
126-
CDemoRecorder();
126+
CDemoRecorder() = default;
127127

128128
CDemoFile *GetDemoFile( void );
129129
int GetRecordingTick( void );

engine/cmodel.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ CTSPool<TraceInfo_t> g_TraceInfoPool;
5656
class CTraceInfoPool : public CTSList<TraceInfo_t *>
5757
{
5858
public:
59-
CTraceInfoPool()
60-
{
61-
}
59+
CTraceInfoPool() = default;
6260
};
6361

6462
CTraceInfoPool g_TraceInfoPool;

engine/colorcorrectionpanel.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ abstract_class IColorOperation
345345
class CColorOperationList
346346
{
347347
public:
348-
CColorOperationList();
348+
CColorOperationList() = default;
349349

350350
// Clears the list
351351
void Clear();
@@ -376,14 +376,6 @@ class CColorOperationList
376376
};
377377

378378

379-
//-----------------------------------------------------------------------------
380-
// Constructor
381-
//-----------------------------------------------------------------------------
382-
CColorOperationList::CColorOperationList()
383-
{
384-
}
385-
386-
387379
//-----------------------------------------------------------------------------
388380
// Clears the list
389381
//-----------------------------------------------------------------------------

engine/dispnode.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class CDispNode
4747
//
4848
// Construction/Decontruction
4949
//
50-
CDispNode() {};
50+
CDispNode() = default;
5151
~CDispNode() {};
5252

5353
//=========================================================================

engine/dt_recv_decoder.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ CClientSendProp::~CClientSendProp()
2929
delete [] m_pTableName;
3030
}
3131

32-
33-
CClientSendTable::CClientSendTable()
34-
{
35-
}
36-
37-
3832
CClientSendTable::~CClientSendTable()
3933
{
4034
delete [] m_SendTable.m_pNetTableName;

engine/dt_recv_decoder.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CClientSendProp
5050
class CClientSendTable
5151
{
5252
public:
53-
CClientSendTable();
53+
CClientSendTable() = default;
5454
~CClientSendTable();
5555

5656
int GetNumProps() const { return m_SendTable.m_nProps; }

engine/gl_rlight.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ ConVar r_visualizelighttracesshowfulltrace( "r_visualizelighttracesshowfulltrace
3737
//-----------------------------------------------------------------------------
3838
struct LightVecState_t
3939
{
40-
LightVecState_t()
41-
{
42-
}
40+
LightVecState_t() = default;
4341
Ray_t m_Ray;
4442
float m_HitFrac;
4543
float* m_pTextureS;

engine/host_state.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef enum
6767
class CHostState
6868
{
6969
public:
70-
CHostState();
70+
CHostState() = default;
7171
void Init();
7272
void FrameUpdate( float time );
7373
void SetNextState( HOSTSTATES nextState );
@@ -275,10 +275,6 @@ static void WatchDogHandler()
275275
// Class implementation
276276
//-----------------------------------------------------------------------------
277277

278-
CHostState::CHostState()
279-
{
280-
}
281-
282278
void CHostState::Init()
283279
{
284280
SetState( HS_RUN, true );

engine/l_studio.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1868,7 +1868,7 @@ struct ModelDebugOverlayData_t
18681868
DrawModelResults_t m_ModelResults;
18691869
Vector m_Origin;
18701870

1871-
ModelDebugOverlayData_t() {}
1871+
ModelDebugOverlayData_t() = default;
18721872

18731873
private:
18741874
ModelDebugOverlayData_t( const ModelDebugOverlayData_t &vOther );

engine/pure_server.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ extern ConVar sv_pure_consensus;
2626
extern ConVar sv_pure_retiretime;
2727
extern ConVar sv_pure_trace;
2828

29-
CPureServerWhitelist::CCommand::CCommand()
30-
{
31-
}
32-
3329
CPureServerWhitelist::CCommand::~CCommand()
3430
{
3531
}

engine/pure_server.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class CPureServerWhitelist : public IPureServerWhitelist
6969
class CCommand
7070
{
7171
public:
72-
CCommand();
72+
CCommand() = default;
7373
~CCommand();
7474

7575
EPureServerFileClass m_eFileClass;

engine/spatialpartition.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class CVoxelHash
168168
{
169169
public:
170170
// Constructor, destructor
171-
CVoxelHash();
171+
CVoxelHash() = default;
172172
~CVoxelHash();
173173

174174
// 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
481481
//-----------------------------------------------------------------------------
482482
// Constructor, destructor
483483
//-----------------------------------------------------------------------------
484-
CVoxelHash::CVoxelHash( )
485-
{
486-
}
487-
488484
CVoxelHash::~CVoxelHash()
489485
{
490486
Shutdown();

filesystem/basefilesystem.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ CUtlVector< FileNameHandle_t > CBaseFileSystem::m_ExcludePaths;
227227
class CStoreIDEntry
228228
{
229229
public:
230-
CStoreIDEntry() {}
230+
CStoreIDEntry() = default;
231231
CStoreIDEntry( const char *pPathIDStr, int storeID )
232232
{
233233
m_PathIDString = pPathIDStr;

game/client/c_weapon__stubs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public: \
2929
DECLARE_PREDICTABLE(); \
3030
DECLARE_CLIENTCLASS(); \
31-
C_##className() {}; \
31+
C_##className() = default; \
3232
private: \
3333
C_##className( const C_##className & ); \
3434
}; \

game/client/cdll_client_int.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ C_BaseEntityClassList::~C_BaseEntityClassList()
305305
class CDataChangedEvent
306306
{
307307
public:
308-
CDataChangedEvent() {}
308+
CDataChangedEvent() = default;
309309
CDataChangedEvent( IClientNetworkable *ent, DataUpdateType_t updateType, int *pStoredEvent )
310310
{
311311
m_pEntity = ent;

game/client/interpolatedvar.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ struct CInterpolatedVarEntryBase
273273
template<typename Type>
274274
struct CInterpolatedVarEntryBase<Type, false>
275275
{
276-
CInterpolatedVarEntryBase() {}
276+
CInterpolatedVarEntryBase() = default;
277277
~CInterpolatedVarEntryBase() {}
278278

279279
const Type *GetValue() const { return &value; }

game/client/movehelper_client.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CMoveHelperClient : public IMoveHelper
5353
Vector deltavelocity;
5454
trace_t trace;
5555

56-
touchlist_t() {}
56+
touchlist_t() = default;
5757

5858
private:
5959
touchlist_t( const touchlist_t &src );
@@ -278,4 +278,4 @@ void CMoveHelperClient::PlayerSetAnimation( PLAYER_ANIM eAnim )
278278
bool CMoveHelperClient::IsWorldEntity( const CBaseHandle &handle )
279279
{
280280
return handle == cl_entitylist->GetNetworkableHandle( 0 );
281-
}
281+
}

game/client/physics.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extern IVEngineClient *engine;
4141
class CCollisionEvent : public IPhysicsCollisionEvent, public IPhysicsCollisionSolver, public IPhysicsObjectEvent
4242
{
4343
public:
44-
CCollisionEvent( void );
44+
CCollisionEvent( void ) = default;
4545

4646
void ObjectSound( int index, vcollisionevent_t *pEvent );
4747
void PreCollision( vcollisionevent_t *pEvent ) {}
@@ -479,12 +479,6 @@ void PhysicsSimulate()
479479
g_PhysicsSystem.PhysicsSimulate();
480480
}
481481

482-
483-
484-
CCollisionEvent::CCollisionEvent( void )
485-
{
486-
}
487-
488482
void CCollisionEvent::ObjectSound( int index, vcollisionevent_t *pEvent )
489483
{
490484
IPhysicsObject *pObject = pEvent->pObjects[index];

game/client/view_effects.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,7 @@ class CViewEffectsSaveRestoreBlockHandler : public CDefSaveRestoreBlockHandler
715715
{
716716
struct QueuedItem_t;
717717
public:
718-
CViewEffectsSaveRestoreBlockHandler()
719-
{
720-
}
718+
CViewEffectsSaveRestoreBlockHandler() = default;
721719

722720
const char *GetBlockName()
723721
{

0 commit comments

Comments
 (0)