From 6e0d22095efece0b83117f0d078be42a7eef910f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 27 Apr 2014 14:29:35 +0200 Subject: [PATCH] Fixed Mesh move constructor/assignment. Missed copying of base vertex. --- src/Magnum/Mesh.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Mesh.cpp b/src/Magnum/Mesh.cpp index e31755309..53da906a2 100644 --- a/src/Magnum/Mesh.cpp +++ b/src/Magnum/Mesh.cpp @@ -92,7 +92,7 @@ Mesh::~Mesh() { (this->*Context::current()->state().mesh->destroyImplementation)(); } -Mesh::Mesh(Mesh&& other) noexcept: _id(other._id), _primitive(other._primitive), _count(other._count) +Mesh::Mesh(Mesh&& other) noexcept: _id(other._id), _primitive(other._primitive), _count(other._count), _baseVertex{other._baseVertex} #ifndef MAGNUM_TARGET_GLES2 , _indexStart(other._indexStart), _indexEnd(other._indexEnd) #endif @@ -111,6 +111,7 @@ Mesh& Mesh::operator=(Mesh&& other) noexcept { std::swap(_id, other._id); std::swap(_primitive, other._primitive); std::swap(_count, other._count); + std::swap(_baseVertex, other._baseVertex); #ifndef MAGNUM_TARGET_GLES2 std::swap(_indexStart, other._indexStart); std::swap(_indexEnd, other._indexEnd);