From f9d4555d191162aabcde9b1db54e73b1e9660f63 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Tue, 16 Jun 2015 08:54:45 +0200 Subject: [PATCH] [MeL] Using getNumberOfTuples() instead of size(). --- MeshLib/MeshEditing/ElementExtraction.cpp | 2 +- MeshLib/MeshEditing/ElementValueModification.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MeshLib/MeshEditing/ElementExtraction.cpp b/MeshLib/MeshEditing/ElementExtraction.cpp index 63aa17bb3b6..fbf8d8b83ac 100644 --- a/MeshLib/MeshEditing/ElementExtraction.cpp +++ b/MeshLib/MeshEditing/ElementExtraction.cpp @@ -81,7 +81,7 @@ std::size_t ElementExtraction::searchByMaterialID(int const matID) MeshLib::PropertyVector<int> const& pv(opt_pv.get()); std::vector<std::size_t> matchedIDs; - for (std::size_t i(0); i<pv.size(); ++i) { + for (std::size_t i(0); i<pv.getNumberOfTuples(); ++i) { if (pv[i]==matID) matchedIDs.push_back(i); } diff --git a/MeshLib/MeshEditing/ElementValueModification.cpp b/MeshLib/MeshEditing/ElementValueModification.cpp index 5cf8185cd6e..00167bd20bf 100644 --- a/MeshLib/MeshEditing/ElementValueModification.cpp +++ b/MeshLib/MeshEditing/ElementValueModification.cpp @@ -38,10 +38,10 @@ bool ElementValueModification::replace(MeshLib::Mesh &mesh, MeshLib::PropertyVector<int> & property_value_vec( optional_property_value_vec.get() ); - const std::size_t n_property_values(property_value_vec.size()); + const std::size_t n_property_tuples(property_value_vec.getNumberOfTuples()); if (!replace_if_exists) { - for (std::size_t i=0; i<n_property_values; ++i) { + for (std::size_t i=0; i<n_property_tuples; ++i) { if (property_value_vec[i] == new_value) { WARN ("ElementValueModification::replaceElementValue() " "- Replacement value \"%d\" is already taken, " @@ -51,7 +51,7 @@ bool ElementValueModification::replace(MeshLib::Mesh &mesh, } } - for (std::size_t i=0; i<n_property_values; ++i) { + for (std::size_t i=0; i<n_property_tuples; ++i) { if (property_value_vec[i] == old_value) property_value_vec[i] = new_value; } -- GitLab