From b0ceee2c424f4dd2fcbbbbd5e47143c04bb7cc00 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 6 May 2022 09:44:22 +1000 Subject: [PATCH] RC_Channel: use reference while iterating to find string for aux func --- libraries/RC_Channel/RC_Channel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index ba740519a7..be119994fb 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -586,7 +586,7 @@ const RC_Channel::LookupTable RC_Channel::lookuptable[] = { /* lookup the announcement for switch change */ const char *RC_Channel::string_for_aux_function(AUX_FUNC function) const { - for (const struct LookupTable entry : lookuptable) { + for (const struct LookupTable &entry : lookuptable) { if (entry.option == function) { return entry.announcement; }