From 1fb82f40b300cd383011b3eb7b4288bbddc8ac6b Mon Sep 17 00:00:00 2001 From: David Williams Date: Sun, 24 Aug 2014 11:51:45 +0200 Subject: [PATCH] Switched to C++11-style hiding of copy constructor and assignment operator. --- library/PolyVoxCore/include/PolyVoxCore/Impl/Array2D.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/Array2D.h b/library/PolyVoxCore/include/PolyVoxCore/Impl/Array2D.h index 062e61e0..3cac675c 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/Array2D.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/Array2D.h @@ -39,6 +39,10 @@ namespace PolyVox m_pData = new ElementType[m_uWidth * m_uHeight]; } + // These are deleted to avoid accidental copying. + Array2D(const Array2D&) = delete; + Array2D& operator=(const Array2D&) = delete; + ~Array2D() { delete[] m_pData; @@ -73,10 +77,6 @@ namespace PolyVox private: - // These are private to avoid accidental copying. - Array2D(const Array2D& rhs); - Array2D& operator=(const Array2D& rhs); - uint32_t m_uWidth; uint32_t m_uHeight; ElementType* m_pData;