diff --git a/src/Trade/MeshData2D.cpp b/src/Trade/MeshData2D.cpp index dc665bc37..57cde771b 100644 --- a/src/Trade/MeshData2D.cpp +++ b/src/Trade/MeshData2D.cpp @@ -28,6 +28,12 @@ namespace Magnum { namespace Trade { +MeshData2D::MeshData2D(Mesh::Primitive primitive, std::vector* indices, std::vector*> positions, std::vector*> textureCoords2D): _primitive(primitive), _indices(indices), _positions(std::move(positions)), _textureCoords2D(std::move(textureCoords2D)) {} + +MeshData2D::MeshData2D(MeshData2D&&) = default; + +MeshData2D& MeshData2D::operator=(MeshData2D&&) = default; + MeshData2D::~MeshData2D() { delete _indices; for(auto i: _positions) delete i; diff --git a/src/Trade/MeshData2D.h b/src/Trade/MeshData2D.h index 4c52fa326..cb48f55b4 100644 --- a/src/Trade/MeshData2D.h +++ b/src/Trade/MeshData2D.h @@ -56,16 +56,16 @@ class MAGNUM_EXPORT MeshData2D { * @param textureCoords2D Array with two-dimensional texture * coordinate arrays or empty array */ - inline MeshData2D(Mesh::Primitive primitive, std::vector* indices, std::vector*> positions, std::vector*> textureCoords2D): _primitive(primitive), _indices(indices), _positions(positions), _textureCoords2D(textureCoords2D) {} + MeshData2D(Mesh::Primitive primitive, std::vector* indices, std::vector*> positions, std::vector*> textureCoords2D); /** @brief Move constructor */ - MeshData2D(MeshData2D&&) = default; + MeshData2D(MeshData2D&&); /** @brief Destructor */ ~MeshData2D(); /** @brief Move assignment */ - MeshData2D& operator=(MeshData2D&&) = default; + MeshData2D& operator=(MeshData2D&&); /** @brief Primitive */ inline Mesh::Primitive primitive() const { return _primitive; } diff --git a/src/Trade/MeshData3D.cpp b/src/Trade/MeshData3D.cpp index cd85af98d..ee6e27253 100644 --- a/src/Trade/MeshData3D.cpp +++ b/src/Trade/MeshData3D.cpp @@ -28,6 +28,12 @@ namespace Magnum { namespace Trade { +MeshData3D::MeshData3D(Mesh::Primitive primitive, std::vector* indices, std::vector*> positions, std::vector*> normals, std::vector*> textureCoords2D): _primitive(primitive), _indices(indices), _positions(std::move(positions)), _normals(std::move(normals)), _textureCoords2D(std::move(textureCoords2D)) {} + +MeshData3D::MeshData3D(MeshData3D&&) = default; + +MeshData3D& MeshData3D::operator=(MeshData3D&&) = default; + MeshData3D::~MeshData3D() { delete _indices; for(auto i: _positions) delete i; diff --git a/src/Trade/MeshData3D.h b/src/Trade/MeshData3D.h index 0a41f02d6..94a3996d1 100644 --- a/src/Trade/MeshData3D.h +++ b/src/Trade/MeshData3D.h @@ -57,16 +57,16 @@ class MAGNUM_EXPORT MeshData3D { * @param textureCoords2D Array with two-dimensional texture * coordinate arrays or empty array */ - inline MeshData3D(Mesh::Primitive primitive, std::vector* indices, std::vector*> positions, std::vector*> normals, std::vector*> textureCoords2D): _primitive(primitive), _indices(indices), _positions(positions), _normals(normals), _textureCoords2D(textureCoords2D) {} + MeshData3D(Mesh::Primitive primitive, std::vector* indices, std::vector*> positions, std::vector*> normals, std::vector*> textureCoords2D); /** @brief Move constructor */ - MeshData3D(MeshData3D&&) = default; + MeshData3D(MeshData3D&&); /** @brief Destructor */ ~MeshData3D(); /** @brief Move assignment */ - MeshData3D& operator=(MeshData3D&&) = default; + MeshData3D& operator=(MeshData3D&&); /** @brief Primitive */ inline Mesh::Primitive primitive() const { return _primitive; }