Browse Source

GCC 4.5 compatibility: can't default this, again.

Vladimír Vondruš 13 years ago
parent
commit
3e8d8bb61a
  1. 9
      src/Trade/MeshData2D.cpp
  2. 10
      src/Trade/MeshData3D.cpp

9
src/Trade/MeshData2D.cpp

@ -36,7 +36,14 @@ MeshData2D::MeshData2D(MeshData2D&&) = default;
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<UnsignedInt>& MeshData2D::indices() { std::vector<UnsignedInt>& MeshData2D::indices() {
CORRADE_ASSERT(isIndexed(), "Trade::MeshData2D::indices(): the mesh is not indexed", _indices); CORRADE_ASSERT(isIndexed(), "Trade::MeshData2D::indices(): the mesh is not indexed", _indices);

10
src/Trade/MeshData3D.cpp

@ -36,7 +36,15 @@ MeshData3D::MeshData3D(MeshData3D&&) = default;
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<UnsignedInt>& MeshData3D::indices() { std::vector<UnsignedInt>& MeshData3D::indices() {
CORRADE_ASSERT(isIndexed(), "Trade::MeshData3D::indices(): the mesh is not indexed", _indices); CORRADE_ASSERT(isIndexed(), "Trade::MeshData3D::indices(): the mesh is not indexed", _indices);

Loading…
Cancel
Save