From 1fcc673230bf585b2b0239d4476b94523bd0ec21 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 5 Sep 2022 15:48:36 -0500 Subject: Cleanup: Remove unused function This had a specific use case relating to the `CurveEval` type which shouldn't be necessary anymore. --- source/blender/blenkernel/BKE_attribute.hh | 5 ----- source/blender/blenkernel/intern/attribute_access.cc | 20 -------------------- 2 files changed, 25 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_attribute.hh b/source/blender/blenkernel/BKE_attribute.hh index 6284cce9dc0..83e1a3208ae 100644 --- a/source/blender/blenkernel/BKE_attribute.hh +++ b/source/blender/blenkernel/BKE_attribute.hh @@ -752,11 +752,6 @@ class CustomDataAttributes { bool create_by_move(const AttributeIDRef &attribute_id, eCustomDataType data_type, void *buffer); bool remove(const AttributeIDRef &attribute_id); - /** - * Change the order of the attributes to match the order of IDs in the argument. - */ - void reorder(Span new_order); - bool foreach_attribute(const AttributeForeachCallback callback, eAttrDomain domain) const; }; diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc index 0187dbd6f78..e39c6d11fa9 100644 --- a/source/blender/blenkernel/intern/attribute_access.cc +++ b/source/blender/blenkernel/intern/attribute_access.cc @@ -784,26 +784,6 @@ bool CustomDataAttributes::foreach_attribute(const AttributeForeachCallback call return true; } -void CustomDataAttributes::reorder(Span new_order) -{ - BLI_assert(new_order.size() == data.totlayer); - - Map old_order; - old_order.reserve(data.totlayer); - Array old_layers(Span(data.layers, data.totlayer)); - for (const int i : old_layers.index_range()) { - old_order.add_new(attribute_id_from_custom_data_layer(old_layers[i]), i); - } - - MutableSpan layers(data.layers, data.totlayer); - for (const int i : layers.index_range()) { - const int old_index = old_order.lookup(new_order[i]); - layers[i] = old_layers[old_index]; - } - - CustomData_update_typemap(&data); -} - /* -------------------------------------------------------------------- */ /** \name Attribute API * \{ */ -- cgit v1.2.3