Replace empty constructors with default constructors #88

This commit is contained in:
nillerusr
2022-11-05 14:23:05 +03:00
parent ba90de20d9
commit 8fbc002a37
97 changed files with 192 additions and 2620 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
public: \
DECLARE_PREDICTABLE(); \
DECLARE_CLIENTCLASS(); \
C_##className() {}; \
C_##className() = default; \
private: \
C_##className( const C_##className & ); \
}; \
+1 -1
View File
@@ -305,7 +305,7 @@ C_BaseEntityClassList::~C_BaseEntityClassList()
class CDataChangedEvent
{
public:
CDataChangedEvent() {}
CDataChangedEvent() = default;
CDataChangedEvent( IClientNetworkable *ent, DataUpdateType_t updateType, int *pStoredEvent )
{
m_pEntity = ent;
+1 -1
View File
@@ -273,7 +273,7 @@ private:
template<typename Type>
struct CInterpolatedVarEntryBase<Type, false>
{
CInterpolatedVarEntryBase() {}
CInterpolatedVarEntryBase() = default;
~CInterpolatedVarEntryBase() {}
const Type *GetValue() const { return &value; }
+2 -2
View File
@@ -53,7 +53,7 @@ private:
Vector deltavelocity;
trace_t trace;
touchlist_t() {}
touchlist_t() = default;
private:
touchlist_t( const touchlist_t &src );
@@ -278,4 +278,4 @@ void CMoveHelperClient::PlayerSetAnimation( PLAYER_ANIM eAnim )
bool CMoveHelperClient::IsWorldEntity( const CBaseHandle &handle )
{
return handle == cl_entitylist->GetNetworkableHandle( 0 );
}
}
+1 -7
View File
@@ -41,7 +41,7 @@ extern IVEngineClient *engine;
class CCollisionEvent : public IPhysicsCollisionEvent, public IPhysicsCollisionSolver, public IPhysicsObjectEvent
{
public:
CCollisionEvent( void );
CCollisionEvent( void ) = default;
void ObjectSound( int index, vcollisionevent_t *pEvent );
void PreCollision( vcollisionevent_t *pEvent ) {}
@@ -479,12 +479,6 @@ void PhysicsSimulate()
g_PhysicsSystem.PhysicsSimulate();
}
CCollisionEvent::CCollisionEvent( void )
{
}
void CCollisionEvent::ObjectSound( int index, vcollisionevent_t *pEvent )
{
IPhysicsObject *pObject = pEvent->pObjects[index];
+1 -3
View File
@@ -715,9 +715,7 @@ class CViewEffectsSaveRestoreBlockHandler : public CDefSaveRestoreBlockHandler
{
struct QueuedItem_t;
public:
CViewEffectsSaveRestoreBlockHandler()
{
}
CViewEffectsSaveRestoreBlockHandler() = default;
const char *GetBlockName()
{
+1 -3
View File
@@ -259,10 +259,8 @@ private:
class CWorldListCache
{
public:
CWorldListCache()
{
CWorldListCache() = default;
}
void Flush()
{
for ( int i = m_Entries.FirstInorder(); i != m_Entries.InvalidIndex(); i = m_Entries.NextInorder( i ) )
+1 -1
View File
@@ -52,7 +52,7 @@ public:
struct AI_NearNode_t
{
AI_NearNode_t() {}
AI_NearNode_t() = default;
AI_NearNode_t( int index, float nodedist ) { dist = nodedist; nodeIndex = index; }
float dist;
int nodeIndex;
+1 -1
View File
@@ -83,7 +83,7 @@ protected:
CEventAction *m_ActionList;
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:
CBaseEntityOutput( CBaseEntityOutput& ); // protect from accidental copying
-4
View File
@@ -17,10 +17,6 @@ END_DATADESC();
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CAI_HolsterBehavior::CAI_HolsterBehavior()
{
// m_AssaultCue = CUE_NO_ASSAULT;
}
//-----------------------------------------------------------------------------
+2 -2
View File
@@ -25,8 +25,8 @@ class CAI_HolsterBehavior : public CAI_SimpleBehavior
DECLARE_CLASS( CAI_HolsterBehavior, CAI_SimpleBehavior );
public:
CAI_HolsterBehavior();
CAI_HolsterBehavior() = default;
virtual const char *GetName() { return "Holster"; }
virtual bool CanSelectSchedule();
-8
View File
@@ -461,14 +461,6 @@ void CNPC_MetroPolice::NotifyDeadFriend( CBaseEntity* pFriend )
m_Sentences.Speak( "METROPOLICE_MAN_DOWN", SENTENCE_PRIORITY_MEDIUM );
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
CNPC_MetroPolice::CNPC_MetroPolice()
{
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
+1 -1
View File
@@ -34,7 +34,7 @@ class CNPC_MetroPolice : public CAI_BaseActor
DECLARE_DATADESC();
public:
CNPC_MetroPolice();
CNPC_MetroPolice() = default;
virtual bool CreateComponents();
bool CreateBehaviors();
+1 -1
View File
@@ -37,7 +37,7 @@ class CNPC_Monk : public CAI_PlayerAlly
public:
CNPC_Monk() {}
CNPC_Monk() = default;
void Spawn();
void Precache();
+1 -5
View File
@@ -33,10 +33,6 @@ void VerifySequenceIndex( CStudioHdr *pstudiohdr );
extern ISoundEmitterSystemBase *soundemitterbase;
CModelSoundsCache::CModelSoundsCache()
{
}
CModelSoundsCache::CModelSoundsCache( const CModelSoundsCache& src )
{
sounds = src.sounds;
@@ -214,4 +210,4 @@ void CModelSoundsCache::BuildAnimationEventSoundList( CStudioHdr *hdr, CUtlVecto
}
}
}
}
}
+1 -1
View File
@@ -23,7 +23,7 @@ class CModelSoundsCache : public IBaseCacheInfo
public:
CUtlVector< unsigned short > sounds;
CModelSoundsCache();
CModelSoundsCache() = default;
CModelSoundsCache( const CModelSoundsCache& src );
void PrecacheSoundList();
+1 -3
View File
@@ -44,9 +44,7 @@ class CActivityRemapCache
{
public:
CActivityRemapCache()
{
}
CActivityRemapCache() = default;
CActivityRemapCache( const CActivityRemapCache& src )
{
+1 -5
View File
@@ -51,10 +51,6 @@ ConVar cl_thirdperson( "cl_thirdperson", "0", FCVAR_NOT_CONNECTED | FCVAR_USERIN
#endif
CThirdPersonManager::CThirdPersonManager( void )
{
}
void CThirdPersonManager::Init( void )
{
m_bOverrideThirdPerson = false;
@@ -227,4 +223,4 @@ bool CThirdPersonManager::WantToUseGameThirdPerson( void )
}
CThirdPersonManager g_ThirdPersonManager;
CThirdPersonManager g_ThirdPersonManager;
+1 -1
View File
@@ -41,7 +41,7 @@ class CThirdPersonManager
{
public:
CThirdPersonManager();
CThirdPersonManager() = default;
void SetCameraOffsetAngles( Vector vecOffset ) { m_vecCameraOffset = vecOffset; }
Vector GetCameraOffsetAngles( void ) { return m_vecCameraOffset; }
+1 -3
View File
@@ -62,9 +62,7 @@ private:
struct DecalEntry
{
DecalEntry()
{
}
DecalEntry() = default;
DecalEntry( const DecalEntry& src )
{
+1 -7
View File
@@ -44,7 +44,7 @@ class CHandle : public CBaseHandle
{
public:
CHandle();
CHandle() = default;
CHandle( int iEntry, int iSerialNumber );
CHandle( const CBaseHandle &handle );
CHandle( T *pVal );
@@ -71,12 +71,6 @@ public:
// Inlines.
// ----------------------------------------------------------------------- //
template<class T>
CHandle<T>::CHandle()
{
}
template<class T>
CHandle<T>::CHandle( int iEntry, int iSerialNumber )
{
+1 -3
View File
@@ -20,9 +20,7 @@ template <class BITSTRING>
class CVarBitVecSaveRestoreOps : public CDefSaveRestoreOps
{
public:
CVarBitVecSaveRestoreOps()
{
}
CVarBitVecSaveRestoreOps() = default;
// save data type interface
virtual void Save( const SaveRestoreFieldInfo_t &fieldInfo, ISave *pSave )
+1 -1
View File
@@ -30,7 +30,7 @@
class CViewVectors
{
public:
CViewVectors() {}
CViewVectors() = default;
CViewVectors(
Vector vView,