From 59c09e1bfacab117a3900a9fa1181e6c4e2a74a0 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Wed, 22 Jul 2020 13:12:17 +0200 Subject: [PATCH] fix copying between propertymanagers with different deprecated second template argument --- src/OpenMesh/Core/Utils/PropertyManager.hh | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/OpenMesh/Core/Utils/PropertyManager.hh b/src/OpenMesh/Core/Utils/PropertyManager.hh index b1726a36..b5d07764 100644 --- a/src/OpenMesh/Core/Utils/PropertyManager.hh +++ b/src/OpenMesh/Core/Utils/PropertyManager.hh @@ -110,10 +110,10 @@ class PropertyManager { // definition for other Mesh Properties template struct StorageT { - static void copy(const PropertyManager& from, PropertyManager2& to) { + static void copy(const PropertyManager& from, PropertyManager2& to) { from.copy_to(from.mesh_.template all_elements(), to, to.mesh_.template all_elements()); } - static void swap(PropertyManager& lhs, PropertyManager2& rhs) { + static void swap(PropertyManager& lhs, PropertyManager2& rhs) { std::swap(lhs.mesh().property(lhs.prop_).data_vector(), rhs.mesh().property(rhs.prop_).data_vector()); // resize the property to the correct size lhs.mesh().property(lhs.prop_).resize(lhs.mesh().template n_elements()); @@ -538,22 +538,22 @@ class PropertyManager { * @param dst_end End iterator. (Exclusive.) * Will be used with dst_propmanager. Used to double check the bounds. */ - template + template void copy_to(HandleTypeIterator begin, HandleTypeIterator end, - PropertyManager &dst_propmanager, - HandleTypeIterator_2 dst_begin, HandleTypeIterator_2 dst_end) const { + PropertyManager2 &dst_propmanager, + HandleTypeIterator2 dst_begin, HandleTypeIterator2 dst_end) const { for (; begin != end && dst_begin != dst_end; ++begin, ++dst_begin) { dst_propmanager[*dst_begin] = (*this)[*begin]; } } - template + template void copy_to(const RangeType &range, - PropertyManager &dst_propmanager, - const RangeType_2 &dst_range) const { + PropertyManager2 &dst_propmanager, + const RangeType2 &dst_range) const { copy_to(range.begin(), range.end(), dst_propmanager, dst_range.begin(), dst_range.end()); } @@ -573,10 +573,10 @@ class PropertyManager { * @param dst_mesh Destination mesh on which to copy. * @param dst_range Destination range. */ - template + template static void copy(const char *prop_name, PolyConnectivity &src_mesh, const RangeType &src_range, - PolyConnectivity &dst_mesh, const RangeType_2 &dst_range) { + PolyConnectivity &dst_mesh, const RangeType2 &dst_range) { typedef OpenMesh::PropertyManager DstPM; DstPM dst(DstPM::createIfNotExists(dst_mesh, prop_name));