mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-14 04:31:05 +00:00
Replace empty constructors with default constructors #88
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user