refactor(platform): out-line ModuleParams::updateParams() to save flash (#29543)

The base implementation, which walks the child list and then calls
updateParamsImpl(), was defined in the class body. Every module that
calls updateParams() on a parameter update therefore inlined the list
walk. Define it in module_params.cpp next to setParent().

px4_fmu-v6x_default: 1917160 -> 1915056 bytes of text, -2104 B.

Assisted-by: Claude:claude-fable-5-1

Co-authored-by: Balduin <balduin@auterion.com>
This commit is contained in:
Jacob DahlandBalduin authored and GitHub committed 2026-10-31 11:42:34 -06:00
1 parent 5602762081
commit 9c1e218b1f
2 files changed
+10 -8

No files matched your search

+9
View File
@@ -42,6 +42,15 @@ void ModuleParams::setParent(ModuleParams *parent)
_parent = parent;
}
void ModuleParams::updateParams()
{
for (const auto &child : _children) {
child->updateParams();
}
updateParamsImpl();
}
ModuleParams::~ModuleParams()
{
if (_parent) { _parent->_children.remove(this); }