From afe2c31ae7dbe810c8b0b7f2b7d37c0851ddc117 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 27 Oct 2016 15:06:11 +1100 Subject: [PATCH] AP_Inertial_Sensor: use const reference --- libraries/AP_InertialSensor/AP_InertialSensor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.h b/libraries/AP_InertialSensor/AP_InertialSensor.h index ec61848e9f..3083973c0f 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.h +++ b/libraries/AP_InertialSensor/AP_InertialSensor.h @@ -142,10 +142,10 @@ public: const Vector3f &get_accel_scale(void) const { return get_accel_scale(_primary_accel); } // return a 3D vector defining the position offset of the IMU accelerometer in metres relative to the body frame origin - const Vector3f get_imu_pos_offset(uint8_t instance) const { + const Vector3f &get_imu_pos_offset(uint8_t instance) const { return _accel_pos[instance]; } - const Vector3f get_imu_pos_offset(void) const { + const Vector3f &get_imu_pos_offset(void) const { return _accel_pos[_primary_accel]; }