From 477357152599cbb16a121103c5ec30985bbfb032 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 18 Nov 2024 10:06:34 +1100 Subject: [PATCH] GCS_MAVLink: stop creating unnecessary Location object on stack Location is implicitly zero. --- libraries/GCS_MAVLink/GCS_Common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 9922a4f8377b0..ed467585171d7 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -5502,7 +5502,7 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_packet(const mavlink_command_int_t &p #endif case MAV_CMD_DO_SET_ROI_NONE: { - const Location zero_loc = Location(); + const Location zero_loc; return handle_command_do_set_roi(zero_loc); }