mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 07:31:35 +08:00
ModuleParams: add setParent() method
This commit is contained in:
@@ -48,6 +48,15 @@ class ModuleParams : public ListNode<ModuleParams *>
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
ModuleParams(ModuleParams *parent)
|
ModuleParams(ModuleParams *parent)
|
||||||
|
{
|
||||||
|
setParent(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the parent module. This is typically not required, only in cases where
|
||||||
|
* the parent cannot be set via constructor.
|
||||||
|
*/
|
||||||
|
void setParent(ModuleParams *parent)
|
||||||
{
|
{
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parent->_children.add(this);
|
parent->_children.add(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user