diff --git a/Param/Node/INode.cpp b/Param/Node/INode.cpp index ab859df035e68acf8d53e69a7757a17dbf414b5d..38fe75f62261a8401f935070082d4e91e23c90bc 100644 --- a/Param/Node/INode.cpp +++ b/Param/Node/INode.cpp @@ -24,14 +24,13 @@ NodeMeta nodeMetaUnion(const std::vector<ParaMeta>& base, const NodeMeta& other) return {other.className, other.tooltip, BaseUtils::algo::concat(base, other.paraMeta)}; } + INode::INode(const NodeMeta& meta, const std::vector<double>& PValues) - : /*m_tooltip(meta.tooltip),*/ - m_NP(meta.paraMeta.size()) + : m_P(PValues) { - m_P.resize(m_NP); setName(meta.className); - for (size_t i = 0; i < m_NP; ++i) { - m_P[i] = PValues[i]; + + for (size_t i = 0; i < meta.paraMeta.size(); ++i) { const ParaMeta& pm = meta.paraMeta[i]; RealLimits limits = RealLimits::limitless(); diff --git a/Param/Node/INode.h b/Param/Node/INode.h index 3c8032e791ed885d2b05a323858606abf61fab0a..3ed01c92838b433b92f45578249dce1e26df4b5e 100644 --- a/Param/Node/INode.h +++ b/Param/Node/INode.h @@ -47,7 +47,7 @@ NodeMeta nodeMetaUnion(const std::vector<ParaMeta>& base, const NodeMeta& other) class INode : public IParametric { public: - INode() : m_NP{0} {} + INode() {} INode(const NodeMeta& meta, const std::vector<double>& PValues); virtual ~INode() {} @@ -78,7 +78,6 @@ private: // const std::string m_tooltip; protected: - const size_t m_NP; std::vector<double> m_P; };