From ed37ee821b5f31572d22f1cd9ad653500b0ad095 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 18 Nov 2024 10:14:25 +1100 Subject: [PATCH] AP_Common: move constructor to header to allow inlining --- libraries/AP_Common/Location.cpp | 6 ------ libraries/AP_Common/Location.h | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/libraries/AP_Common/Location.cpp b/libraries/AP_Common/Location.cpp index 27803566d0..dc08944af3 100644 --- a/libraries/AP_Common/Location.cpp +++ b/libraries/AP_Common/Location.cpp @@ -9,12 +9,6 @@ #include #include -/// constructors -Location::Location() -{ - zero(); -} - const Location definitely_zero{}; bool Location::is_zero(void) const { diff --git a/libraries/AP_Common/Location.h b/libraries/AP_Common/Location.h index 14cb3b36a2..72558024a0 100644 --- a/libraries/AP_Common/Location.h +++ b/libraries/AP_Common/Location.h @@ -28,7 +28,7 @@ public: }; /// constructors - Location(); + Location() { zero(); } Location(int32_t latitude, int32_t longitude, int32_t alt_in_cm, AltFrame frame); Location(const Vector3f &ekf_offset_neu, AltFrame frame); Location(const Vector3d &ekf_offset_neu, AltFrame frame);