[Bf-blender-cvs] [4c1a59fa967] functions: cleanup

Jacques Lucke noreply at git.blender.org
Sun Feb 10 20:26:58 CET 2019


Commit: 4c1a59fa967a0ce4496cf9affb576e47b0bf2991
Author: Jacques Lucke
Date:   Sun Feb 10 12:35:51 2019 +0100
Branches: functions
https://developer.blender.org/rB4c1a59fa967a0ce4496cf9affb576e47b0bf2991

cleanup

===================================================================

M	source/blender/functions/core/core.hpp

===================================================================

diff --git a/source/blender/functions/core/core.hpp b/source/blender/functions/core/core.hpp
index 2cf503f630f..4c44f8d9694 100644
--- a/source/blender/functions/core/core.hpp
+++ b/source/blender/functions/core/core.hpp
@@ -44,40 +44,38 @@ namespace FN {
 			m_extensions.add(extension);
 		}
 
-	protected:
-		std::string m_name;
-
 	private:
+		std::string m_name;
 		Composition m_extensions;
 	};
 
 	class Parameter {
 	public:
 		Parameter(const std::string &name, const SharedType &type)
-			: m_type(type), m_name(name) {}
+			: m_name(name), m_type(type) {}
 
-		const SharedType &type() const
+		const std::string &name() const
 		{
-			return m_type;
+			return m_name;
 		}
 
-		const std::string &name() const
+		const SharedType &type() const
 		{
-			return m_name;
+			return m_type;
 		}
 
 	private:
-		const SharedType m_type;
 		const std::string m_name;
+		const SharedType m_type;
 	};
 
-	class InputParameter : public Parameter {
+	class InputParameter final : public Parameter {
 	public:
 		InputParameter(const std::string &name, const SharedType &type)
 			: Parameter(name, type) {}
 	};
 
-	class OutputParameter : public Parameter {
+	class OutputParameter final : public Parameter {
 	public:
 		OutputParameter(const std::string &name, const SharedType &type)
 			: Parameter(name, type) {}
@@ -130,13 +128,18 @@ namespace FN {
 	class Function final {
 	public:
 		Function(const std::string &name, const Signature &signature)
-			:m_signature(signature), m_name(name) {}
+			: m_name(name), m_signature(signature) {}
 
 		Function(const Signature &signature)
 			: Function("Function", signature) {}
 
 		~Function() = default;
 
+		const std::string &name() const
+		{
+			return m_name;
+		}
+
 		inline const Signature &signature() const
 		{
 			return m_signature;
@@ -155,15 +158,10 @@ namespace FN {
 			m_bodies.add(body);
 		}
 
-		const std::string &name() const
-		{
-			return m_name;
-		}
-
 	private:
+		const std::string m_name;
 		const Signature m_signature;
 		Composition m_bodies;
-		const std::string m_name;
 	};
 
 } /* namespace FN */
\ No newline at end of file



More information about the Bf-blender-cvs mailing list