Switched to C++11-style hiding of copy constructor and assignment operator.

This commit is contained in:
David Williams 2014-08-24 11:51:45 +02:00
parent ad73caf368
commit 1fb82f40b3

View File

@ -39,6 +39,10 @@ namespace PolyVox
m_pData = new ElementType[m_uWidth * m_uHeight];
}
// These are deleted to avoid accidental copying.
Array2D<ElementType>(const Array2D<ElementType>&) = delete;
Array2D<ElementType>& operator=(const Array2D<ElementType>&) = delete;
~Array2D()
{
delete[] m_pData;
@ -73,10 +77,6 @@ namespace PolyVox
private:
// These are private to avoid accidental copying.
Array2D<ElementType>(const Array2D<ElementType>& rhs);
Array2D<ElementType>& operator=(const Array2D<ElementType>& rhs);
uint32_t m_uWidth;
uint32_t m_uHeight;
ElementType* m_pData;