diff --git a/Param/Node/INode.h b/Param/Node/INode.h index 4308f60ed646102d6ee93bc3b1d2f709aa5425d2..fbd02ceb230616c7bd50abe9a8338f8784c02d2a 100644 --- a/Param/Node/INode.h +++ b/Param/Node/INode.h @@ -29,10 +29,10 @@ const double INF = std::numeric_limits<double>::infinity(); struct ParaMeta { std::string name; std::string unit; - std::string tooltip; - double vMin; - double vMax; - double vDefault; + std::string tooltip {""}; + double vMin {0}; + double vMax {0}; + double vDefault {0}; }; //! Base class for tree-like structures containing parameterized objects. diff --git a/Sample/HardParticle/Box.h b/Sample/HardParticle/Box.h index ce750de89c34075ed0749ea6614869553689403e..276834aeb5a1e80b6c45279243bfb418d1309e09 100644 --- a/Sample/HardParticle/Box.h +++ b/Sample/HardParticle/Box.h @@ -28,12 +28,12 @@ public: Box* clone() const override { return new Box(m_length, m_width, m_height); } std::string className() const final { return "Box"; } - // const auto tooltip = "rectangular cuboid"; + std::vector<ParaMeta> parDefs() const final { - return {{"Length", "nm", "side length in x direction", 0, +INF, 0}, - {"Width", "nm", "side length in y direction", 0, +INF, 0}, - {"Height", "nm", "side length in z direction", 0, +INF, 0}}; + return {{"Length", "nm"}, + {"Width", "nm"}, + {"Height", "nm"}}; } double length() const { return m_length; }