mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
Replace empty constructors with default constructors #88
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
public: \
|
||||
DECLARE_PREDICTABLE(); \
|
||||
DECLARE_CLIENTCLASS(); \
|
||||
C_##className() {}; \
|
||||
C_##className() = default; \
|
||||
private: \
|
||||
C_##className( const C_##className & ); \
|
||||
}; \
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -273,7 +273,7 @@ private:
|
||||
template<typename Type>
|
||||
struct CInterpolatedVarEntryBase<Type, false>
|
||||
{
|
||||
CInterpolatedVarEntryBase() {}
|
||||
CInterpolatedVarEntryBase() = default;
|
||||
~CInterpolatedVarEntryBase() {}
|
||||
|
||||
const Type *GetValue() const { return &value; }
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -715,9 +715,7 @@ class CViewEffectsSaveRestoreBlockHandler : public CDefSaveRestoreBlockHandler
|
||||
{
|
||||
struct QueuedItem_t;
|
||||
public:
|
||||
CViewEffectsSaveRestoreBlockHandler()
|
||||
{
|
||||
}
|
||||
CViewEffectsSaveRestoreBlockHandler() = default;
|
||||
|
||||
const char *GetBlockName()
|
||||
{
|
||||
|
||||
@@ -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 ) )
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,10 +17,6 @@ END_DATADESC();
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
CAI_HolsterBehavior::CAI_HolsterBehavior()
|
||||
{
|
||||
// m_AssaultCue = CUE_NO_ASSAULT;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -461,14 +461,6 @@ void CNPC_MetroPolice::NotifyDeadFriend( CBaseEntity* pFriend )
|
||||
m_Sentences.Speak( "METROPOLICE_MAN_DOWN", SENTENCE_PRIORITY_MEDIUM );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
CNPC_MetroPolice::CNPC_MetroPolice()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -34,7 +34,7 @@ class CNPC_MetroPolice : public CAI_BaseActor
|
||||
DECLARE_DATADESC();
|
||||
|
||||
public:
|
||||
CNPC_MetroPolice();
|
||||
CNPC_MetroPolice() = default;
|
||||
|
||||
virtual bool CreateComponents();
|
||||
bool CreateBehaviors();
|
||||
|
||||
@@ -37,7 +37,7 @@ class CNPC_Monk : public CAI_PlayerAlly
|
||||
|
||||
public:
|
||||
|
||||
CNPC_Monk() {}
|
||||
CNPC_Monk() = default;
|
||||
void Spawn();
|
||||
void Precache();
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class CModelSoundsCache : public IBaseCacheInfo
|
||||
public:
|
||||
CUtlVector< unsigned short > sounds;
|
||||
|
||||
CModelSoundsCache();
|
||||
CModelSoundsCache() = default;
|
||||
CModelSoundsCache( const CModelSoundsCache& src );
|
||||
|
||||
void PrecacheSoundList();
|
||||
|
||||
@@ -44,9 +44,7 @@ class CActivityRemapCache
|
||||
{
|
||||
public:
|
||||
|
||||
CActivityRemapCache()
|
||||
{
|
||||
}
|
||||
CActivityRemapCache() = default;
|
||||
|
||||
CActivityRemapCache( const CActivityRemapCache& src )
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -41,7 +41,7 @@ class CThirdPersonManager
|
||||
{
|
||||
public:
|
||||
|
||||
CThirdPersonManager();
|
||||
CThirdPersonManager() = default;
|
||||
void SetCameraOffsetAngles( Vector vecOffset ) { m_vecCameraOffset = vecOffset; }
|
||||
Vector GetCameraOffsetAngles( void ) { return m_vecCameraOffset; }
|
||||
|
||||
|
||||
@@ -62,9 +62,7 @@ private:
|
||||
|
||||
struct DecalEntry
|
||||
{
|
||||
DecalEntry()
|
||||
{
|
||||
}
|
||||
DecalEntry() = default;
|
||||
|
||||
DecalEntry( const DecalEntry& src )
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
class CViewVectors
|
||||
{
|
||||
public:
|
||||
CViewVectors() {}
|
||||
CViewVectors() = default;
|
||||
|
||||
CViewVectors(
|
||||
Vector vView,
|
||||
|
||||
Reference in New Issue
Block a user