From d15d88ab9d042473d36043983ff53b237c9f096e Mon Sep 17 00:00:00 2001
From: Karsten Rink <karsten.rink@ufz.de>
Date: Fri, 30 May 2014 21:40:00 +0200
Subject: [PATCH] changed signature of getSurfaceAreaForNodes to not use
 pointers

---
 MeshLib/MeshSurfaceExtraction.cpp | 8 ++++----
 MeshLib/MeshSurfaceExtraction.h   | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/MeshLib/MeshSurfaceExtraction.cpp b/MeshLib/MeshSurfaceExtraction.cpp
index c69d9423826..80d49020270 100644
--- a/MeshLib/MeshSurfaceExtraction.cpp
+++ b/MeshLib/MeshSurfaceExtraction.cpp
@@ -28,15 +28,15 @@
 
 namespace MeshLib {
 
-void MeshSurfaceExtraction::getSurfaceAreaForNodes(const MeshLib::Mesh* mesh, std::vector<double> &node_area_vec)
+void MeshSurfaceExtraction::getSurfaceAreaForNodes(const MeshLib::Mesh &mesh, std::vector<double> &node_area_vec)
 {
-	if (mesh->getDimension() == 2)
+	if (mesh.getDimension() == 2)
 	{
 		double total_area (0);
 
 		// for each node, a vector containing all the element idget every element
-		std::vector<MeshLib::Node*> nodes = mesh->getNodes();
-		const size_t nNodes ( mesh->getNNodes() );
+		std::vector<MeshLib::Node*> nodes = mesh.getNodes();
+		const size_t nNodes ( mesh.getNNodes() );
 		for (size_t n=0; n<nNodes; ++n)
 		{
 			double node_area (0);
diff --git a/MeshLib/MeshSurfaceExtraction.h b/MeshLib/MeshSurfaceExtraction.h
index 0953c982898..2f55f97d43c 100644
--- a/MeshLib/MeshSurfaceExtraction.h
+++ b/MeshLib/MeshSurfaceExtraction.h
@@ -37,7 +37,7 @@ class MeshSurfaceExtraction
 {
 public:
 	/// Returns the area assigned to each node on a surface mesh.
-	static void getSurfaceAreaForNodes(const MeshLib::Mesh* mesh, std::vector<double> &node_area_vec);
+	static void getSurfaceAreaForNodes(const MeshLib::Mesh &mesh, std::vector<double> &node_area_vec);
 
 	/// Returns the surface nodes of a layered mesh.
 	static std::vector<GeoLib::PointWithID*> getSurfaceNodes(const MeshLib::Mesh &mesh, const MathLib::Vector3 &dir);
-- 
GitLab