From ce495b5fcf3a826aab7f9d5bc362b33c1a9370a5 Mon Sep 17 00:00:00 2001
From: Norihiro Watanabe <norihiro.watanabe@ufz.de>
Date: Mon, 12 Jan 2015 19:17:58 +0100
Subject: [PATCH] rename set() to setByElementType()

---
 Applications/Utils/MeshEdit/editMaterialID.cpp   | 2 +-
 MeshLib/MeshEditing/ElementValueModification.cpp | 2 +-
 MeshLib/MeshEditing/ElementValueModification.h   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Applications/Utils/MeshEdit/editMaterialID.cpp b/Applications/Utils/MeshEdit/editMaterialID.cpp
index f9b533d3161..3a75c3adb13 100644
--- a/Applications/Utils/MeshEdit/editMaterialID.cpp
+++ b/Applications/Utils/MeshEdit/editMaterialID.cpp
@@ -98,7 +98,7 @@ int main (int argc, char* argv[])
 		const std::string eleTypeName(eleTypeArg.getValue());
 		const MeshElemType eleType = String2MeshElemType(eleTypeName);
 		const unsigned newID = newIDArg.getValue();
-		unsigned cnt = MeshLib::ElementValueModification::set(*mesh, eleType, newID);
+		unsigned cnt = MeshLib::ElementValueModification::setByElementType(*mesh, eleType, newID);
 		INFO("updated %d elements", cnt);
 	}
 
diff --git a/MeshLib/MeshEditing/ElementValueModification.cpp b/MeshLib/MeshEditing/ElementValueModification.cpp
index d6bb6c1c4d9..be2a76aabb1 100644
--- a/MeshLib/MeshEditing/ElementValueModification.cpp
+++ b/MeshLib/MeshEditing/ElementValueModification.cpp
@@ -91,7 +91,7 @@ unsigned ElementValueModification::condense(MeshLib::Mesh &mesh)
 	return nValues;
 }
 
-unsigned ElementValueModification::set(MeshLib::Mesh &mesh, MeshElemType ele_type, unsigned new_value)
+unsigned ElementValueModification::setByElementType(MeshLib::Mesh &mesh, MeshElemType ele_type, unsigned new_value)
 {
 	std::vector<MeshLib::Element*> elements (mesh.getElements());
 	unsigned nValues = 0;
diff --git a/MeshLib/MeshEditing/ElementValueModification.h b/MeshLib/MeshEditing/ElementValueModification.h
index 40fbf25dbf3..6d1b43744f0 100644
--- a/MeshLib/MeshEditing/ElementValueModification.h
+++ b/MeshLib/MeshEditing/ElementValueModification.h
@@ -16,6 +16,7 @@
 #define MESHVALUEMODIFICATION_H
 
 #include <vector>
+
 #include "MeshLib/MeshEnums.h"
 
 namespace MeshLib {
@@ -37,7 +38,8 @@ public:
 	static bool replace(MeshLib::Mesh &mesh, unsigned old_value, unsigned new_value, bool replace_if_exists = false);
 
 	/// Sets new value for all elements having the given element type
-	static unsigned set(MeshLib::Mesh &mesh, MeshElemType ele_type, unsigned new_value);
+	/// Returns the number of elements having the given element type
+	static unsigned setByElementType(MeshLib::Mesh &mesh, MeshElemType ele_type, unsigned new_value);
 
 private:
 	/// Returns the values of elements within the mesh
-- 
GitLab