From 3e8d8bb61a56c026ad72e47d83e2a839c3eda53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 7 Jul 2013 11:08:23 +0200 Subject: [PATCH] GCC 4.5 compatibility: can't default this, again. --- src/Trade/MeshData2D.cpp | 9 ++++++++- src/Trade/MeshData3D.cpp | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Trade/MeshData2D.cpp b/src/Trade/MeshData2D.cpp index 4e06a1b00..9732d72e2 100644 --- a/src/Trade/MeshData2D.cpp +++ b/src/Trade/MeshData2D.cpp @@ -36,7 +36,14 @@ MeshData2D::MeshData2D(MeshData2D&&) = default; MeshData2D::~MeshData2D() = default; -MeshData2D& MeshData2D::operator=(MeshData2D&&) = default; +/* GCC 4.5 doesn't like it defaulted */ +MeshData2D& MeshData2D::operator=(MeshData2D&& other) { + std::swap(_primitive, other._primitive); + std::swap(_indices, other._indices); + std::swap(_positions, other._positions); + std::swap(_textureCoords2D, other._textureCoords2D); + return *this; +} std::vector& MeshData2D::indices() { CORRADE_ASSERT(isIndexed(), "Trade::MeshData2D::indices(): the mesh is not indexed", _indices); diff --git a/src/Trade/MeshData3D.cpp b/src/Trade/MeshData3D.cpp index a483521ec..9594bdef1 100644 --- a/src/Trade/MeshData3D.cpp +++ b/src/Trade/MeshData3D.cpp @@ -36,7 +36,15 @@ MeshData3D::MeshData3D(MeshData3D&&) = default; MeshData3D::~MeshData3D() = default; -MeshData3D& MeshData3D::operator=(MeshData3D&&) = default; +/* GCC 4.5 doesn't like it defaulted */ +MeshData3D& MeshData3D::operator=(MeshData3D&& other) { + std::swap(_primitive, other._primitive); + std::swap(_indices, other._indices); + std::swap(_positions, other._positions); + std::swap(_normals, other._normals); + std::swap(_textureCoords2D, other._textureCoords2D); + return *this; +} std::vector& MeshData3D::indices() { CORRADE_ASSERT(isIndexed(), "Trade::MeshData3D::indices(): the mesh is not indexed", _indices);