mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-25 03:38:22 +08:00
Both were defined inline in the header, so the List add/remove bodies were duplicated into the constructor and destructor of every one of the 150+ ModuleParams-derived classes. Construction and destruction are cold paths; a call is smaller at each site. Two consumers reach ModuleParams without px4_platform on the link line and now need the definitions explicitly: health_and_arming_checks (the functional-ModeManagement test only pulls it in transitively through modules__commander, after px4_platform) and the failsafe_web emscripten build, which compiles module_params.cpp directly. The smaller constructors let the compiler fully inline the defaulted FlightTaskDescend constructor on the ITCM boards, so its entry is dropped from their linker scripts. Saves 3968 B of .text on px4_fmu-v6x_default. Assisted-by: Claude:claude-fable-5 Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com> Co-authored-by: Balduin <balduin@auterion.com>