From c6faee268dcc71b72665a93c16f38a922c350b59 Mon Sep 17 00:00:00 2001
From: Norihiro Watanabe <norihiro.watanabe@ufz.de>
Date: Wed, 28 Jan 2015 13:21:39 +0100
Subject: [PATCH] have default value of element id and value only in
 TemplateElement

---
 MeshLib/Elements/Cell.cpp  |  6 ------
 MeshLib/Elements/Cell.h    | 10 ++++------
 MeshLib/Elements/Edge.h    | 15 +++++++--------
 MeshLib/Elements/Element.h |  4 +++-
 MeshLib/Elements/Face.cpp  |  6 ------
 MeshLib/Elements/Face.h    | 12 ++++--------
 6 files changed, 18 insertions(+), 35 deletions(-)

diff --git a/MeshLib/Elements/Cell.cpp b/MeshLib/Elements/Cell.cpp
index 01253939f01..b1f86db40f5 100644
--- a/MeshLib/Elements/Cell.cpp
+++ b/MeshLib/Elements/Cell.cpp
@@ -20,12 +20,6 @@
 
 namespace MeshLib {
 
-/*
-Cell::Cell(Node** nodes, MeshElemType type, unsigned value)
-	: Element(nodes, type, value)
-{
-}
-*/
 Cell::Cell(unsigned value, std::size_t id)
 	: Element(value, id)
 {
diff --git a/MeshLib/Elements/Cell.h b/MeshLib/Elements/Cell.h
index 8c06822cf83..fac3a678b8c 100644
--- a/MeshLib/Elements/Cell.h
+++ b/MeshLib/Elements/Cell.h
@@ -42,12 +42,10 @@ public:
 	virtual bool testElementNodeOrder() const;
 
 protected:
-/*
-	/// Constructor for a generic mesh element containing an array of mesh nodes.
-	Cell(Node** nodes, MeshElemType type, unsigned value = 0);
-*/
-	/// Constructor for a generic mesh element without an array of mesh nodes.
-	Cell(unsigned value = 0, std::size_t id = std::numeric_limits<std::size_t>::max());
+	/// Constructor
+	/// @param value  element value
+	/// @param id     element id
+	Cell(unsigned value, std::size_t id);
 }; /* class */
 
 }
diff --git a/MeshLib/Elements/Edge.h b/MeshLib/Elements/Edge.h
index d7cc1ff77d8..6a212caf60f 100644
--- a/MeshLib/Elements/Edge.h
+++ b/MeshLib/Elements/Edge.h
@@ -15,8 +15,6 @@
 #ifndef EDGE_H_
 #define EDGE_H_
 
-#include <limits>
-
 #include "Element.h"
 
 namespace MeshLib {
@@ -34,15 +32,16 @@ public:
 	virtual ~Edge() {}
 
 	/**
-		* Checks if the node order of an element is correct by testing surface normals.
-		* For 1D elements this always returns true.
-		*/
+	* Checks if the node order of an element is correct by testing surface normals.
+	* For 1D elements this always returns true.
+	*/
 	virtual bool testElementNodeOrder() const { return true; }
 
 protected:
-	/// Constructor for a generic mesh element without an array of mesh nodes.
-	Edge(unsigned value = 0, std::size_t id = std::numeric_limits<std::size_t>::max()) : Element(value, id) {}
-
+	/// Constructor
+	/// @param value  element value
+	/// @param id     element id
+	Edge(unsigned value, std::size_t id) : Element(value, id) {}
 
 }; /* class */
 
diff --git a/MeshLib/Elements/Element.h b/MeshLib/Elements/Element.h
index bcffc2cd401..6f8c856e039 100644
--- a/MeshLib/Elements/Element.h
+++ b/MeshLib/Elements/Element.h
@@ -216,7 +216,9 @@ public:
 
 protected:
 	/// Constructor for a generic mesh element without an array of mesh nodes.
-	Element(unsigned value = 0, std::size_t id = std::numeric_limits<std::size_t>::max());
+	/// @param value  element value
+	/// @param id     element id
+	Element(unsigned value, std::size_t id);
 
 	/// Sets the element ID.
 	virtual void setID(std::size_t id) { this->_id = id; }
diff --git a/MeshLib/Elements/Face.cpp b/MeshLib/Elements/Face.cpp
index 600468da609..0c5748b9f16 100644
--- a/MeshLib/Elements/Face.cpp
+++ b/MeshLib/Elements/Face.cpp
@@ -21,12 +21,6 @@
 
 namespace MeshLib {
 
-/*
-Face::Face(Node** nodes, MeshElemType type, unsigned value)
-	: Element(nodes, type, value)
-{
-}
-*/
 Face::Face(unsigned value, std::size_t id)
 	: Element(value, id)
 {
diff --git a/MeshLib/Elements/Face.h b/MeshLib/Elements/Face.h
index 14209d906d4..e9c006dfc4e 100644
--- a/MeshLib/Elements/Face.h
+++ b/MeshLib/Elements/Face.h
@@ -15,8 +15,6 @@
 #ifndef FACE_H_
 #define FACE_H_
 
-#include <limits>
-
 #include "GeoLib/Point.h"
 
 #include "MathLib/Vector3.h"
@@ -47,12 +45,10 @@ public:
 	virtual bool testElementNodeOrder() const;
 
 protected:
-/*
-	/// Constructor for a generic mesh element containing an array of mesh nodes.
-	Face(Node** nodes, MeshElemType type, unsigned value = 0);
-*/
-	/// Constructor for a generic mesh element without an array of mesh nodes.
-	Face(unsigned value = 0, std::size_t id = std::numeric_limits<std::size_t>::max());
+	/// Constructor
+	/// @param value  element value
+	/// @param id     element id
+	Face(unsigned value, std::size_t id);
 
 private:
 
-- 
GitLab