From 33a84624c68ecf9d87f0cde56c670524e1075022 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 23 Jan 2017 21:36:34 +1100 Subject: [PATCH] AP_AHRS: use const reference save a bit of stack and CPU --- libraries/AP_AHRS/AP_AHRS_NavEKF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index 6a30355383..ae5fe84f3d 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -93,7 +93,7 @@ void AP_AHRS_NavEKF::update(void) // push gyros if optical flow present if (hal.opticalflow) { - Vector3f exported_gyro_bias = get_gyro_drift(); + const Vector3f &exported_gyro_bias = get_gyro_drift(); hal.opticalflow->push_gyro_bias(exported_gyro_bias.x, exported_gyro_bias.y); } }