summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc3
-rw-r--r--src/components/application_manager/src/helpers/application_helper.cc12
2 files changed, 8 insertions, 7 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
index b9d87d74b1..b623350388 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_app_extension.cc
@@ -88,7 +88,8 @@ void RCAppExtension::UnsubscribeFromInteriorVehicleData(
void RCAppExtension::UnsubscribeFromInteriorVehicleDataOfType(
const std::string& module_type) {
bool unsubscribed = false;
- for (auto& item : subscribed_interior_vehicle_data_) {
+ auto subscribed_ivi = subscribed_interior_vehicle_data_;
+ for (auto& item : subscribed_ivi) {
if (module_type == item.first) {
subscribed_interior_vehicle_data_.erase(item);
unsubscribed = true;
diff --git a/src/components/application_manager/src/helpers/application_helper.cc b/src/components/application_manager/src/helpers/application_helper.cc
index c9a0d87aed..74810d7e09 100644
--- a/src/components/application_manager/src/helpers/application_helper.cc
+++ b/src/components/application_manager/src/helpers/application_helper.cc
@@ -23,9 +23,9 @@ void DeleteWayPoints(ApplicationSharedPtr app,
void DeleteCommands(ApplicationSharedPtr app, ApplicationManager& app_manager) {
auto accessor = app->commands_map();
- const auto& commands_map = accessor.GetData();
+ const auto commands_map = accessor.GetData();
- for (const auto& cmd : commands_map) {
+ for (const auto cmd : commands_map) {
auto delete_UI_msg = MessageHelper::CreateDeleteUICommandRequest(
cmd.second, app->app_id(), app_manager.GetNextHMICorrelationID());
app_manager.GetRPCService().ManageHMICommand(delete_UI_msg);
@@ -41,9 +41,9 @@ void DeleteCommands(ApplicationSharedPtr app, ApplicationManager& app_manager) {
void DeleteSubmenus(ApplicationSharedPtr app, ApplicationManager& app_manager) {
auto accessor = app->sub_menu_map();
- const auto& sub_menu_map = accessor.GetData();
+ const auto sub_menu_map = accessor.GetData();
- for (const auto& smenu : sub_menu_map) {
+ for (const auto smenu : sub_menu_map) {
MessageHelper::SendDeleteSubmenuRequest(smenu.second, app, app_manager);
app->RemoveSubMenu(smenu.first);
}
@@ -52,9 +52,9 @@ void DeleteSubmenus(ApplicationSharedPtr app, ApplicationManager& app_manager) {
void DeleteChoiceSets(ApplicationSharedPtr app,
ApplicationManager& app_manager) {
auto accessor = app->choice_set_map();
- const auto& choices = accessor.GetData();
+ const auto choices = accessor.GetData();
- for (const auto& choice : choices) {
+ for (const auto choice : choices) {
MessageHelper::SendDeleteChoiceSetRequest(choice.second, app, app_manager);
app->RemoveChoiceSet(choice.first);
}