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:
@@ -30,7 +30,7 @@ class CVguiMatSysApp : public CVguiSteamApp
|
||||
typedef CVguiSteamApp BaseClass;
|
||||
|
||||
public:
|
||||
CVguiMatSysApp();
|
||||
CVguiMatSysApp() = default;
|
||||
|
||||
// Methods of IApplication
|
||||
virtual bool Create();
|
||||
|
||||
+3
-5
@@ -373,7 +373,7 @@ public:
|
||||
int FindNextSetBit(int iStartBit) const; // returns -1 if no set bit was found
|
||||
|
||||
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
|
||||
|
||||
void ValidateOperand( const CFixedBitVecBase<NUM_BITS> &operand ) const { } // no need, compiler does so statically
|
||||
@@ -428,10 +428,8 @@ template < int NUM_BITS >
|
||||
class CBitVec : public CBitVecT< CFixedBitVecBase<NUM_BITS> >
|
||||
{
|
||||
public:
|
||||
CBitVec()
|
||||
{
|
||||
}
|
||||
|
||||
CBitVec() = default;
|
||||
|
||||
CBitVec(int numBits)
|
||||
: CBitVecT< CFixedBitVecBase<NUM_BITS> >(numBits)
|
||||
{
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ struct ikcontextikrule_t
|
||||
Vector kneeDir;
|
||||
Vector kneePos;
|
||||
|
||||
ikcontextikrule_t() {}
|
||||
ikcontextikrule_t() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
|
||||
@@ -427,11 +427,11 @@ public:
|
||||
|
||||
#define DECLARE_ATTRIBUTE_ARRAY_VARIABLE( _className, _elementType ) \
|
||||
public: \
|
||||
_className() {}
|
||||
_className() = default;
|
||||
|
||||
#define DECLARE_ATTRIBUTE_ARRAY_REFERENCE( _className, _elementType ) \
|
||||
public: \
|
||||
_className() {} \
|
||||
_className() = default; \
|
||||
_className( CDmAttribute* pAttribute ) { BaseClass::Init( pAttribute ); } \
|
||||
_className( CDmElement *pElement, const char *pAttributeName, bool bAddAttribute = false ) { BaseClass::Init( pElement, pAttributeName, bAddAttribute ); } \
|
||||
_className( CDmaArray<_className>& var ) { BaseClass::Init( var.GetAttribute() ); } \
|
||||
@@ -439,7 +439,7 @@ public:
|
||||
|
||||
#define DECLARE_ATTRIBUTE_ARRAY_CONST_REFERENCE( _className, _elementType ) \
|
||||
public: \
|
||||
_className() {} \
|
||||
_className() = default; \
|
||||
_className( const CDmAttribute* pAttribute ) { BaseClass::Init( pAttribute ); } \
|
||||
_className( const CDmElement *pElement, const char *pAttributeName ) { BaseClass::Init( pElement, pAttributeName ); } \
|
||||
_className( const CDmaArray<_className>& var ) { BaseClass::Init( var.GetAttribute() ); } \
|
||||
|
||||
@@ -116,7 +116,7 @@ template < class T >
|
||||
class CDmAbstractElementFactory : public IDmElementFactoryInternal
|
||||
{
|
||||
public:
|
||||
CDmAbstractElementFactory() {}
|
||||
CDmAbstractElementFactory() = default;
|
||||
|
||||
// Creation, destruction
|
||||
virtual CDmElement* Create( DmElementHandle_t handle, const char *pElementType, const char *pElementName, DmFileId_t fileid, const DmObjectId_t &id )
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class CNodeVert
|
||||
{
|
||||
public:
|
||||
CNodeVert() {}
|
||||
CNodeVert() = default;
|
||||
CNodeVert( int ix, int iy ) {x=ix; y=iy;}
|
||||
|
||||
inline int& operator[]( int i ) {return ((int*)this)[i];}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
class CVertIndex
|
||||
{
|
||||
public:
|
||||
CVertIndex();
|
||||
CVertIndex() = default;
|
||||
CVertIndex( short ix, short iy );
|
||||
|
||||
void Init( short ix, short iy );
|
||||
@@ -62,11 +62,6 @@ inline CVertIndex BuildOffsetVertIndex(
|
||||
// CVertIndex inlines.
|
||||
// ------------------------------------------------------------------ //
|
||||
|
||||
inline CVertIndex::CVertIndex()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline CVertIndex::CVertIndex( short ix, short iy )
|
||||
{
|
||||
x = ix;
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public:
|
||||
// Otherwise, this is the hitbox index.
|
||||
int hitbox; // box hit by trace in studio
|
||||
|
||||
CGameTrace() {}
|
||||
CGameTrace() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
class CSPVert
|
||||
{
|
||||
public:
|
||||
CSPVert();
|
||||
CSPVert() = default;
|
||||
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 ) );
|
||||
@@ -254,10 +254,6 @@ inline CTextParams::CTextParams()
|
||||
m_flLetterWidth = 3;
|
||||
}
|
||||
|
||||
inline CSPVert::CSPVert()
|
||||
{
|
||||
}
|
||||
|
||||
inline CSPVert::CSPVert( Vector const &vPos, const CSPColor &vColor )
|
||||
{
|
||||
Init( vPos, vColor );
|
||||
|
||||
@@ -1751,7 +1751,7 @@ class CMatRenderContextPtr : public CRefPtr<IMatRenderContext>
|
||||
{
|
||||
typedef CRefPtr<IMatRenderContext> BaseClass;
|
||||
public:
|
||||
CMatRenderContextPtr() {}
|
||||
CMatRenderContextPtr() = default;
|
||||
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() { if ( BaseClass::m_pObject ) BaseClass::m_pObject->EndRender(); }
|
||||
|
||||
@@ -222,17 +222,13 @@ inline void IncrementFloatPointer( float* &pBufferPointer, int vertexSize )
|
||||
class CPrimList
|
||||
{
|
||||
public:
|
||||
CPrimList();
|
||||
CPrimList() = default;
|
||||
CPrimList( int nFirstIndex, int nIndexCount );
|
||||
|
||||
int m_FirstIndex;
|
||||
int m_NumIndices;
|
||||
};
|
||||
|
||||
inline CPrimList::CPrimList()
|
||||
{
|
||||
}
|
||||
|
||||
inline CPrimList::CPrimList( int nFirstIndex, int nIndexCount )
|
||||
{
|
||||
m_FirstIndex = nFirstIndex;
|
||||
|
||||
@@ -149,7 +149,7 @@ class Quaternion64
|
||||
{
|
||||
public:
|
||||
// Construction/destruction:
|
||||
Quaternion64(void) {};
|
||||
Quaternion64(void) = default;
|
||||
Quaternion64(vec_t X, vec_t Y, vec_t Z);
|
||||
|
||||
// assignment
|
||||
@@ -197,7 +197,7 @@ class Quaternion48
|
||||
{
|
||||
public:
|
||||
// Construction/destruction:
|
||||
Quaternion48(void) {};
|
||||
Quaternion48(void) = default;
|
||||
Quaternion48(vec_t X, vec_t Y, vec_t Z);
|
||||
|
||||
// assignment
|
||||
@@ -501,7 +501,7 @@ protected:
|
||||
class float16_with_assign : public float16
|
||||
{
|
||||
public:
|
||||
float16_with_assign() {}
|
||||
float16_with_assign() = default;
|
||||
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; }
|
||||
@@ -518,7 +518,7 @@ class Vector48
|
||||
{
|
||||
public:
|
||||
// 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 ); }
|
||||
|
||||
// assignment
|
||||
@@ -562,7 +562,7 @@ class Vector2d32
|
||||
{
|
||||
public:
|
||||
// Construction/destruction:
|
||||
Vector2d32(void) {}
|
||||
Vector2d32(void) = default;
|
||||
Vector2d32(vec_t X, vec_t Y) { x.SetFloat( X ); y.SetFloat( Y ); }
|
||||
|
||||
// assignment
|
||||
|
||||
@@ -237,7 +237,7 @@ bool R_CullBoxSkipNear( const Vector& mins, const Vector& maxs, const Frustum_t
|
||||
|
||||
struct matrix3x4_t
|
||||
{
|
||||
matrix3x4_t() {}
|
||||
matrix3x4_t() = default;
|
||||
matrix3x4_t(
|
||||
float m00, float m01, float m02, float m03,
|
||||
float m10, float m11, float m12, float m13,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2604,9 +2604,7 @@ public:
|
||||
return Vector( X(idx), Y(idx), Z(idx) );
|
||||
}
|
||||
|
||||
FourVectors(void)
|
||||
{
|
||||
}
|
||||
FourVectors(void) = default;
|
||||
|
||||
FourVectors( FourVectors const &src )
|
||||
{
|
||||
|
||||
+33
-35
@@ -70,7 +70,17 @@ public:
|
||||
vec_t x, y, z;
|
||||
|
||||
// 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);
|
||||
explicit Vector(vec_t XYZ); ///< broadcast initialize
|
||||
|
||||
@@ -373,7 +383,7 @@ public:
|
||||
class ALIGN16 VectorAligned : public Vector
|
||||
{
|
||||
public:
|
||||
inline VectorAligned(void) {};
|
||||
inline VectorAligned(void) = default;
|
||||
inline VectorAligned(vec_t X, vec_t Y, vec_t 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)
|
||||
{
|
||||
x = X; y = Y; z = Z;
|
||||
@@ -1542,15 +1539,16 @@ class RadianEuler;
|
||||
class Quaternion // same data-layout as engine's vec4_t,
|
||||
{ // which is a vec_t[4]
|
||||
public:
|
||||
inline Quaternion(void) {
|
||||
|
||||
// Initialize to NAN to catch errors
|
||||
#ifdef _DEBUG
|
||||
#ifdef VECTOR_PARANOIA
|
||||
#if defined (_DEBUG) && defined VECTOR_PARANOIA
|
||||
inline Quaternion(void)
|
||||
{
|
||||
// Initialize to NAN to catch errors
|
||||
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(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
|
||||
{
|
||||
public:
|
||||
inline QuaternionAligned(void) {};
|
||||
inline QuaternionAligned(void) = default;
|
||||
inline QuaternionAligned(vec_t X, vec_t Y, vec_t Z, vec_t W)
|
||||
{
|
||||
Init(X,Y,Z,W);
|
||||
@@ -1661,7 +1659,7 @@ class QAngle;
|
||||
class RadianEuler
|
||||
{
|
||||
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(Quaternion const &q); // evil auto type promotion!!!
|
||||
inline RadianEuler(QAngle const &angles); // evil auto type promotion!!!
|
||||
@@ -1771,7 +1769,17 @@ public:
|
||||
vec_t x, y, z;
|
||||
|
||||
// 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(RadianEuler const &angles); // evil auto type promotion!!!
|
||||
|
||||
@@ -1871,16 +1879,6 @@ inline void VectorMA( const QAngle &start, float scale, const QAngle &direction,
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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)
|
||||
{
|
||||
x = X; y = Y; z = Z;
|
||||
|
||||
+10
-10
@@ -36,7 +36,16 @@ public:
|
||||
vec_t x, y;
|
||||
|
||||
// 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(const float *pFloat);
|
||||
|
||||
@@ -194,15 +203,6 @@ void Vector2DLerp(const Vector2D& src1, const Vector2D& src2, vec_t t, Vector2D&
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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)
|
||||
{
|
||||
x = X; y = Y;
|
||||
|
||||
+11
-11
@@ -42,7 +42,16 @@ public:
|
||||
vec_t x, y, z, w;
|
||||
|
||||
// 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(const float *pFloat);
|
||||
|
||||
@@ -139,7 +148,7 @@ const Vector4D vec4_invalid( FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX );
|
||||
class ALIGN16 Vector4DAligned : public Vector4D
|
||||
{
|
||||
public:
|
||||
Vector4DAligned(void) {}
|
||||
Vector4DAligned(void) = default;
|
||||
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 );
|
||||
@@ -204,15 +213,6 @@ void Vector4DLerp(Vector4D const& src1, Vector4D const& src2, vec_t t, Vector4D&
|
||||
//-----------------------------------------------------------------------------
|
||||
// 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 )
|
||||
{
|
||||
x = X; y = Y; z = Z; w = W;
|
||||
|
||||
@@ -29,7 +29,7 @@ typedef int SideType;
|
||||
class VPlane
|
||||
{
|
||||
public:
|
||||
VPlane();
|
||||
VPlane() = default;
|
||||
VPlane(const Vector &vNormal, vec_t dist);
|
||||
|
||||
void Init(const Vector &vNormal, vec_t dist);
|
||||
@@ -77,10 +77,6 @@ private:
|
||||
//-----------------------------------------------------------------------------
|
||||
// Inlines.
|
||||
//-----------------------------------------------------------------------------
|
||||
inline VPlane::VPlane()
|
||||
{
|
||||
}
|
||||
|
||||
inline VPlane::VPlane(const Vector &vNormal, vec_t dist)
|
||||
{
|
||||
m_Normal = vNormal;
|
||||
|
||||
@@ -1422,9 +1422,8 @@ public:
|
||||
class CM128AttributeWriteIterator : public CStridedPtr<fltx4>
|
||||
{
|
||||
public:
|
||||
FORCEINLINE CM128AttributeWriteIterator( void )
|
||||
{
|
||||
}
|
||||
FORCEINLINE CM128AttributeWriteIterator( void ) = default;
|
||||
|
||||
FORCEINLINE void Init ( int nAttribute, CParticleCollection *pParticles )
|
||||
{
|
||||
m_pData = pParticles->GetM128AttributePtrForWrite( nAttribute, &m_nStride );
|
||||
|
||||
@@ -278,7 +278,7 @@ private:
|
||||
|
||||
CHashElement( const CBaseEntity *pEntity, int index) : pEntity(pEntity), index(index) {}
|
||||
CHashElement( const CBaseEntity *pEntity ) : pEntity(pEntity) {}
|
||||
CHashElement() {}
|
||||
CHashElement() = default;
|
||||
};
|
||||
|
||||
class CHashFuncs
|
||||
|
||||
+22
-21
@@ -147,7 +147,7 @@ struct mstudioaxisinterpbone_t
|
||||
Vector pos[6]; // X+, X-, Y+, Y-, Z+, Z-
|
||||
Quaternion quat[6];// X+, X-, Y+, Y-, Z+, Z-
|
||||
|
||||
mstudioaxisinterpbone_t(){}
|
||||
mstudioaxisinterpbone_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioaxisinterpbone_t(const mstudioaxisinterpbone_t& vOther);
|
||||
@@ -162,7 +162,7 @@ struct mstudioquatinterpinfo_t
|
||||
Vector pos; // new position
|
||||
Quaternion quat; // new angle
|
||||
|
||||
mstudioquatinterpinfo_t(){}
|
||||
mstudioquatinterpinfo_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioquatinterpinfo_t(const mstudioquatinterpinfo_t& vOther);
|
||||
@@ -176,7 +176,7 @@ struct mstudioquatinterpbone_t
|
||||
int triggerindex;
|
||||
inline mstudioquatinterpinfo_t *pTrigger( int i ) const { return (mstudioquatinterpinfo_t *)(((byte *)this) + triggerindex) + i; };
|
||||
|
||||
mstudioquatinterpbone_t(){}
|
||||
mstudioquatinterpbone_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioquatinterpbone_t(const mstudioquatinterpbone_t& vOther);
|
||||
@@ -261,7 +261,7 @@ struct mstudioaimatbone_t
|
||||
Vector upvector;
|
||||
Vector basepos;
|
||||
|
||||
mstudioaimatbone_t() {}
|
||||
mstudioaimatbone_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioaimatbone_t(const mstudioaimatbone_t& vOther);
|
||||
@@ -297,7 +297,7 @@ struct mstudiobone_t
|
||||
|
||||
int unused[8]; // remove as appropriate
|
||||
|
||||
mstudiobone_t(){}
|
||||
mstudiobone_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudiobone_t(const mstudiobone_t& vOther);
|
||||
@@ -339,7 +339,7 @@ struct mstudiolinearbone_t
|
||||
|
||||
int unused[6];
|
||||
|
||||
mstudiolinearbone_t(){}
|
||||
mstudiolinearbone_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
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_flMax; // Max value of bone component mapped to 1 on flex controller
|
||||
|
||||
mstudioboneflexdrivercontrol_t(){}
|
||||
mstudioboneflexdrivercontrol_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioboneflexdrivercontrol_t( const mstudioboneflexdrivercontrol_t &vOther );
|
||||
@@ -396,7 +396,7 @@ struct mstudioboneflexdriver_t
|
||||
|
||||
int unused[3];
|
||||
|
||||
mstudioboneflexdriver_t(){}
|
||||
mstudioboneflexdriver_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioboneflexdriver_t( const mstudioboneflexdriver_t &vOther );
|
||||
@@ -468,7 +468,7 @@ struct mstudiobbox_t
|
||||
return ((const char*)this) + szhitboxnameindex;
|
||||
}
|
||||
|
||||
mstudiobbox_t() {}
|
||||
mstudiobbox_t() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
@@ -532,7 +532,7 @@ struct mstudioikerror_t
|
||||
Vector pos;
|
||||
Quaternion q;
|
||||
|
||||
mstudioikerror_t() {}
|
||||
mstudioikerror_t() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
@@ -547,7 +547,7 @@ struct mstudiocompressedikerror_t
|
||||
float scale[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; };
|
||||
mstudiocompressedikerror_t(){}
|
||||
mstudiocompressedikerror_t() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
@@ -598,7 +598,7 @@ struct mstudioikrule_t
|
||||
|
||||
int unused[7];
|
||||
|
||||
mstudioikrule_t() {}
|
||||
mstudioikrule_t() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
@@ -699,7 +699,8 @@ struct mstudiomovement_t
|
||||
Vector vector; // movement vector relative to this blocks initial angle
|
||||
Vector position; // relative to start of animation???
|
||||
|
||||
mstudiomovement_t(){}
|
||||
mstudiomovement_t() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
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; };
|
||||
mutable float zeroframestalltime; // saved during read stalls
|
||||
|
||||
mstudioanimdesc_t(){}
|
||||
mstudioanimdesc_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
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!)
|
||||
|
||||
mstudioseqdesc_t(){}
|
||||
mstudioseqdesc_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioseqdesc_t(const mstudioseqdesc_t& vOther);
|
||||
@@ -1100,7 +1101,7 @@ public:
|
||||
};
|
||||
friend class CSortByIndex;
|
||||
|
||||
mstudiovertanim_t(){}
|
||||
mstudiovertanim_t() = default;
|
||||
//private:
|
||||
// No copy constructors allowed, but it's needed for std::sort()
|
||||
// mstudiovertanim_t(const mstudiovertanim_t& vOther);
|
||||
@@ -1211,7 +1212,7 @@ struct mstudiovertex_t
|
||||
Vector m_vecNormal;
|
||||
Vector2D m_vecTexCoord;
|
||||
|
||||
mstudiovertex_t() {}
|
||||
mstudiovertex_t() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
@@ -1269,7 +1270,7 @@ struct mstudioeyeball_t
|
||||
char unused3[3];
|
||||
int unused4[7];
|
||||
|
||||
mstudioeyeball_t(){}
|
||||
mstudioeyeball_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioeyeball_t(const mstudioeyeball_t& vOther);
|
||||
@@ -1284,7 +1285,7 @@ struct mstudioiklink_t
|
||||
Vector kneeDir; // ideal bending direction (per link, if applicable)
|
||||
Vector unused0; // unused
|
||||
|
||||
mstudioiklink_t(){}
|
||||
mstudioiklink_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudioiklink_t(const mstudioiklink_t& vOther);
|
||||
@@ -1411,7 +1412,7 @@ struct mstudiomesh_t
|
||||
int unused[8]; // remove as appropriate
|
||||
#endif
|
||||
|
||||
mstudiomesh_t(){}
|
||||
mstudiomesh_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudiomesh_t(const mstudiomesh_t& vOther);
|
||||
@@ -1697,7 +1698,7 @@ struct mstudiomouth_t
|
||||
Vector forward;
|
||||
int flexdesc;
|
||||
|
||||
mstudiomouth_t(){}
|
||||
mstudiomouth_t() = default;
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
mstudiomouth_t(const mstudiomouth_t& vOther);
|
||||
|
||||
@@ -325,7 +325,7 @@ template< class DummyType >
|
||||
class CIntHandle16 : public CBaseIntHandle< unsigned short >
|
||||
{
|
||||
public:
|
||||
inline CIntHandle16() {}
|
||||
inline CIntHandle16() = default;
|
||||
|
||||
static inline CIntHandle16<DummyType> MakeHandle( HANDLE_TYPE val )
|
||||
{
|
||||
@@ -344,7 +344,7 @@ template< class DummyType >
|
||||
class CIntHandle32 : public CBaseIntHandle< unsigned long >
|
||||
{
|
||||
public:
|
||||
inline CIntHandle32() {}
|
||||
inline CIntHandle32() = default;
|
||||
|
||||
static inline CIntHandle32<DummyType> MakeHandle( HANDLE_TYPE val )
|
||||
{
|
||||
|
||||
@@ -118,7 +118,7 @@ template < class FunctionType >
|
||||
class CDynamicFunctionMustInit : public CDynamicFunction < FunctionType >
|
||||
{
|
||||
private: // forbid default constructor.
|
||||
CDynamicFunctionMustInit() {}
|
||||
CDynamicFunctionMustInit() = default;
|
||||
|
||||
public:
|
||||
CDynamicFunctionMustInit(const char *libname, const char *fn, FunctionType fallback=NULL)
|
||||
|
||||
@@ -494,7 +494,7 @@ inline CAverageTimeMarker::~CAverageTimeMarker()
|
||||
class CLimitTimer
|
||||
{
|
||||
public:
|
||||
CLimitTimer() {}
|
||||
CLimitTimer() = default;
|
||||
CLimitTimer( uint64 cMicroSecDuration ) { SetLimit( cMicroSecDuration ); }
|
||||
void SetLimit( uint64 m_cMicroSecDuration );
|
||||
bool BLimitReached() const;
|
||||
|
||||
@@ -609,7 +609,7 @@ private:
|
||||
class CThreadLocalPtr : private CThreadLocalBase
|
||||
{
|
||||
public:
|
||||
CThreadLocalPtr() {}
|
||||
CThreadLocalPtr() = default;
|
||||
|
||||
operator const void *() const { return (const T *)Get(); }
|
||||
operator void *() { return (T *)Get(); }
|
||||
|
||||
@@ -433,7 +433,7 @@ class TSLIST_HEAD_ALIGN CTSList : public CTSListBase
|
||||
public:
|
||||
struct TSLIST_NODE_ALIGN Node_t : public TSLNodeBase_t
|
||||
{
|
||||
Node_t() {}
|
||||
Node_t() = default;
|
||||
Node_t( const T &init ) : elem( init ) {}
|
||||
T elem;
|
||||
|
||||
@@ -524,7 +524,7 @@ class TSLIST_HEAD_ALIGN CTSListWithFreeList : public CTSListBase
|
||||
public:
|
||||
struct TSLIST_NODE_ALIGN Node_t : public TSLNodeBase_t
|
||||
{
|
||||
Node_t() {}
|
||||
Node_t() = default;
|
||||
Node_t( const T &init ) : elem( init ) {}
|
||||
|
||||
T elem;
|
||||
@@ -692,7 +692,7 @@ public:
|
||||
MemAlloc_FreeAligned( p );
|
||||
}
|
||||
|
||||
Node_t() {}
|
||||
Node_t() = default;
|
||||
Node_t( const T &init ) : elem( init ) {}
|
||||
|
||||
Node_t *pNext;
|
||||
|
||||
@@ -167,7 +167,7 @@ class CRefPtr : public CBaseAutoPtr<T>
|
||||
{
|
||||
typedef CBaseAutoPtr<T> BaseClass;
|
||||
public:
|
||||
CRefPtr() {}
|
||||
CRefPtr() = default;
|
||||
CRefPtr( T *pInit ) : BaseClass( pInit ) {}
|
||||
CRefPtr( const CRefPtr<T> &from ) : BaseClass( from ) {}
|
||||
~CRefPtr() { if ( BaseClass::m_pObject ) BaseClass::m_pObject->Release(); }
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
K m_key;
|
||||
V m_value;
|
||||
|
||||
CUtlKeyValuePair() {}
|
||||
CUtlKeyValuePair() = default;
|
||||
|
||||
template < typename KInit >
|
||||
explicit CUtlKeyValuePair( const KInit &k ) : m_key( k ) {}
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
typedef const K ValueReturn_t;
|
||||
K m_key;
|
||||
|
||||
CUtlKeyValuePair() {}
|
||||
CUtlKeyValuePair() = default;
|
||||
|
||||
template < typename KInit >
|
||||
explicit CUtlKeyValuePair( const KInit &k ) : m_key( k ) {}
|
||||
|
||||
@@ -257,9 +257,8 @@ public:
|
||||
typedef _CUtlLinkedList_constiterator_t< List_t > Base;
|
||||
|
||||
// Default constructor -- gives a currently unusable iterator.
|
||||
_CUtlLinkedList_iterator_t()
|
||||
{
|
||||
}
|
||||
_CUtlLinkedList_iterator_t() = default;
|
||||
|
||||
// Normal constructor.
|
||||
_CUtlLinkedList_iterator_t( const List_t& list, IndexType_t index )
|
||||
: _CUtlLinkedList_constiterator_t< List_t >( list, index )
|
||||
@@ -1231,7 +1230,7 @@ private:
|
||||
|
||||
struct Node_t
|
||||
{
|
||||
Node_t() {}
|
||||
Node_t() = default;
|
||||
Node_t( const T &_elem ) : elem( _elem ) {}
|
||||
|
||||
T elem;
|
||||
|
||||
@@ -175,9 +175,7 @@ public:
|
||||
|
||||
struct Node_t
|
||||
{
|
||||
Node_t()
|
||||
{
|
||||
}
|
||||
Node_t() = default;
|
||||
|
||||
Node_t( const Node_t &from )
|
||||
: key( from.key ),
|
||||
|
||||
@@ -17,7 +17,7 @@ template<typename T1, typename T2>
|
||||
class CUtlPair
|
||||
{
|
||||
public:
|
||||
CUtlPair() {}
|
||||
CUtlPair() = default;
|
||||
CUtlPair( T1 t1, T2 t2 ) : first( t1 ), second( t2 ) {}
|
||||
|
||||
bool operator<( const CUtlPair<T1,T2> &rhs ) const {
|
||||
|
||||
@@ -32,7 +32,7 @@ template <typename T>
|
||||
class CDefLess
|
||||
{
|
||||
public:
|
||||
CDefLess() {}
|
||||
CDefLess() = default;
|
||||
CDefLess( int i ) {}
|
||||
inline bool operator()( const T &lhs, const T &rhs ) const { return ( lhs < rhs ); }
|
||||
inline bool operator!() const { return false; }
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
m_nStride = nByteStride / sizeof( T );
|
||||
}
|
||||
|
||||
FORCEINLINE CStridedPtr<T>( void ) {}
|
||||
FORCEINLINE CStridedPtr<T>( void ) = default;
|
||||
T *operator->(void) const
|
||||
{
|
||||
return m_pData;
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
m_nStride = nByteStride / sizeof( T );
|
||||
}
|
||||
|
||||
FORCEINLINE CStridedConstPtr<T>( void ) {}
|
||||
FORCEINLINE CStridedConstPtr<T>( void ) = default;
|
||||
|
||||
const T *operator->(void) const
|
||||
{
|
||||
|
||||
@@ -138,9 +138,7 @@ protected:
|
||||
class CStringPoolIndex
|
||||
{
|
||||
public:
|
||||
inline CStringPoolIndex()
|
||||
{
|
||||
}
|
||||
inline CStringPoolIndex() = default;
|
||||
|
||||
inline CStringPoolIndex( unsigned short iPool, unsigned short iOffset )
|
||||
: m_iPool(iPool), m_iOffset(iOffset)
|
||||
|
||||
@@ -1487,7 +1487,7 @@ public:
|
||||
return strcmp( *sz1, *sz2 );
|
||||
}
|
||||
|
||||
CUtlStringList(){}
|
||||
CUtlStringList() = default;
|
||||
|
||||
CUtlStringList( char const *pString, char const *pSeparator )
|
||||
{
|
||||
|
||||
@@ -69,9 +69,7 @@ public:
|
||||
class CP4Factory
|
||||
{
|
||||
public:
|
||||
CP4Factory();
|
||||
~CP4Factory();
|
||||
|
||||
CP4Factory() = default;
|
||||
public:
|
||||
// Sets whether dummy objects are created by the factory.
|
||||
// Returns the old state of the dummy mode.
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public:
|
||||
bool allsolid; // if true, plane is not valid
|
||||
bool startsolid; // if true, the initial point was in a solid area
|
||||
|
||||
CBaseTrace() {}
|
||||
CBaseTrace() = default;
|
||||
|
||||
private:
|
||||
// No copy constructors allowed
|
||||
|
||||
@@ -30,7 +30,7 @@ struct fluid_t
|
||||
|
||||
fluidparams_t params;
|
||||
|
||||
fluid_t() {}
|
||||
fluid_t() = default;
|
||||
fluid_t( fluid_t const& src ) : params(src.params)
|
||||
{
|
||||
index = src.index;
|
||||
|
||||
+2
-3
@@ -30,9 +30,8 @@ template<class ELEMTYPE> class Dar : public CUtlVector< ELEMTYPE >
|
||||
typedef CUtlVector< ELEMTYPE > BaseClass;
|
||||
|
||||
public:
|
||||
Dar()
|
||||
{
|
||||
}
|
||||
Dar() = default;
|
||||
|
||||
Dar(int initialCapacity) :
|
||||
BaseClass( 0, initialCapacity )
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ typedef unsigned long HFont;
|
||||
|
||||
struct Vertex_t
|
||||
{
|
||||
Vertex_t() {}
|
||||
Vertex_t() = default;
|
||||
Vertex_t( const Vector2D &pos, const Vector2D &coord = Vector2D( 0, 0 ) )
|
||||
{
|
||||
m_Position = pos;
|
||||
|
||||
@@ -301,7 +301,7 @@ private:
|
||||
|
||||
struct CustomCursorCache_t
|
||||
{
|
||||
CustomCursorCache_t() {}
|
||||
CustomCursorCache_t() = default;
|
||||
CustomCursorCache_t( const void *pchData ) { m_pchData = pchData; }
|
||||
float m_CacheTime; // the time we cached the cursor
|
||||
CursorCode m_Cursor; // the vgui handle to it
|
||||
|
||||
@@ -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 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 )
|
||||
{
|
||||
static_cast<constraint_hingeparams_t &>(*this) = hinge;
|
||||
|
||||
@@ -1021,7 +1021,7 @@ struct fluidparams_t
|
||||
bool useAerodynamics;// true if this controller should calculate surface pressure
|
||||
int contents;
|
||||
|
||||
fluidparams_t() {}
|
||||
fluidparams_t() = default;
|
||||
fluidparams_t( fluidparams_t const& src )
|
||||
{
|
||||
Vector4DCopy( src.surfacePlane, surfacePlane );
|
||||
|
||||
@@ -930,7 +930,7 @@ struct fluidparams_t
|
||||
bool useAerodynamics;// true if this controller should calculate surface pressure
|
||||
int contents;
|
||||
|
||||
fluidparams_t() {}
|
||||
fluidparams_t() = default;
|
||||
fluidparams_t( fluidparams_t const& src )
|
||||
{
|
||||
Vector4DCopy( src.surfacePlane, surfacePlane );
|
||||
|
||||
Reference in New Issue
Block a user