mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-20 09:59:06 +08:00
ModuleParams: add setParent() method
This commit is contained in:
parent
408cfd6ce1
commit
e32d8ea8b6
@ -48,6 +48,15 @@ class ModuleParams : public ListNode<ModuleParams *>
|
||||
public:
|
||||
|
||||
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) {
|
||||
parent->_children.add(this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user