From 794b49976b57f4c26cd66c4c6aa018ae48998e98 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Tue, 5 Nov 2019 10:21:09 +0100 Subject: [PATCH] fix swap of property managers --- src/OpenMesh/Core/Utils/PropertyManager.hh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/OpenMesh/Core/Utils/PropertyManager.hh b/src/OpenMesh/Core/Utils/PropertyManager.hh index dbfba226..a48bc8b8 100644 --- a/src/OpenMesh/Core/Utils/PropertyManager.hh +++ b/src/OpenMesh/Core/Utils/PropertyManager.hh @@ -252,10 +252,8 @@ class PropertyManager { } void swap(PropertyManager &rhs) { - std::swap(mesh_, rhs.mesh_); - std::swap(prop_, rhs.prop_); - std::swap(retain_, rhs.retain_); - std::swap(name_, rhs.name_); + // swap the data stored in the properties + Storage::swap(rhs, *this); } static bool propertyExists(PolyConnectivity &mesh, const char *propname) { @@ -316,7 +314,7 @@ class PropertyManager { } else { - // switch the data stored in the properties + // swap the data stored in the properties Storage::swap(rhs, *this); // remove the property from rhs rhs.mesh_.remove_property(rhs.prop_);