mirror of https://github.com/PCSX2/pcsx2.git
After 4 attempts, I suppose it's my turn...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3605 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
cfc3944a90
commit
24aac1f1f2
|
@ -227,7 +227,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
using _parent::operator[];
|
using _parent::operator[];
|
||||||
|
|
||||||
virtual ~SafeAlignedArray();
|
virtual ~SafeAlignedArray() throw();
|
||||||
|
|
||||||
explicit SafeAlignedArray( const wxChar* name=L"Unnamed" ) :
|
explicit SafeAlignedArray( const wxChar* name=L"Unnamed" ) :
|
||||||
SafeArray<T>::SafeArray( name )
|
SafeArray<T>::SafeArray( name )
|
||||||
|
|
|
@ -62,7 +62,7 @@ SafeArray<T>::~SafeArray() throw()
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
SafeArray<T>::SafeArray( const wxChar* name=L"Unnamed" )
|
SafeArray<T>::SafeArray( const wxChar* name )
|
||||||
: Name( name )
|
: Name( name )
|
||||||
{
|
{
|
||||||
ChunkSize = DefaultChunkSize;
|
ChunkSize = DefaultChunkSize;
|
||||||
|
@ -71,7 +71,7 @@ SafeArray<T>::SafeArray( const wxChar* name=L"Unnamed" )
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
SafeArray<T>::SafeArray( int initialSize, const wxChar* name=L"Unnamed" )
|
SafeArray<T>::SafeArray( int initialSize, const wxChar* name )
|
||||||
: Name( name )
|
: Name( name )
|
||||||
{
|
{
|
||||||
ChunkSize = DefaultChunkSize;
|
ChunkSize = DefaultChunkSize;
|
||||||
|
@ -132,14 +132,14 @@ T* SafeAlignedArray<T,Alignment>::_virtual_realloc( int newsize )
|
||||||
// Maybe useful,maybe not... no harm in attaching it. :D
|
// Maybe useful,maybe not... no harm in attaching it. :D
|
||||||
|
|
||||||
template< typename T, uint Alignment >
|
template< typename T, uint Alignment >
|
||||||
SafeAlignedArray<T,Alignment>::~SafeAlignedArray()
|
SafeAlignedArray<T,Alignment>::~SafeAlignedArray() throw()
|
||||||
{
|
{
|
||||||
safe_aligned_free( this->m_ptr );
|
safe_aligned_free( this->m_ptr );
|
||||||
// mptr is set to null, so the parent class's destructor won't re-free it.
|
// mptr is set to null, so the parent class's destructor won't re-free it.
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename T, uint Alignment >
|
template< typename T, uint Alignment >
|
||||||
SafeAlignedArray<T,Alignment>::SafeAlignedArray( int initialSize, const wxChar* name=L"Unnamed" ) :
|
SafeAlignedArray<T,Alignment>::SafeAlignedArray( int initialSize, const wxChar* name ) :
|
||||||
SafeArray<T>::SafeArray(
|
SafeArray<T>::SafeArray(
|
||||||
name,
|
name,
|
||||||
(T*)_aligned_malloc( initialSize * sizeof(T), Alignment ),
|
(T*)_aligned_malloc( initialSize * sizeof(T), Alignment ),
|
||||||
|
@ -173,7 +173,7 @@ SafeList<T>::~SafeList() throw()
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
SafeList<T>::SafeList( const wxChar* name=L"Unnamed" )
|
SafeList<T>::SafeList( const wxChar* name )
|
||||||
: Name( name )
|
: Name( name )
|
||||||
{
|
{
|
||||||
ChunkSize = DefaultChunkSize;
|
ChunkSize = DefaultChunkSize;
|
||||||
|
@ -183,7 +183,7 @@ SafeList<T>::SafeList( const wxChar* name=L"Unnamed" )
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
SafeList<T>::SafeList( int initialSize, const wxChar* name=L"Unnamed" )
|
SafeList<T>::SafeList( int initialSize, const wxChar* name )
|
||||||
: Name( name )
|
: Name( name )
|
||||||
{
|
{
|
||||||
ChunkSize = DefaultChunkSize;
|
ChunkSize = DefaultChunkSize;
|
||||||
|
|
|
@ -87,7 +87,6 @@ protected:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
class TlsVariable : public BaseTlsVariable<T>
|
class TlsVariable : public BaseTlsVariable<T>
|
||||||
{
|
{
|
||||||
|
@ -95,6 +94,7 @@ class TlsVariable : public BaseTlsVariable<T>
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
T m_initval;
|
T m_initval;
|
||||||
|
bool m_IsDisposed;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TlsVariable() {}
|
TlsVariable() {}
|
||||||
|
@ -109,6 +109,9 @@ public:
|
||||||
m_IsDisposed = true;
|
m_IsDisposed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is needed; The C++ standard likes making life suck for programmers.
|
||||||
|
using BaseTlsVariable<T>::GetRef;
|
||||||
|
|
||||||
TlsVariable<T>& operator=( const T& src )
|
TlsVariable<T>& operator=( const T& src )
|
||||||
{
|
{
|
||||||
GetRef() = src;
|
GetRef() = src;
|
||||||
|
|
Loading…
Reference in New Issue