summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcollin <collin@livio.io>2021-04-16 12:10:29 -0400
committercollin <collin@livio.io>2021-04-16 12:10:29 -0400
commit4caf1a3031a5472dce694e719fe36d9acadf5668 (patch)
tree4cc968d6c66746f5dcda40aeb9ac4bb2756c0b6a
parentd72f3aa5281f9646dd6dd1c76486d84fe551dbba (diff)
downloadsdl_core-fix/post_operators.tar.gz
change for loop updatesfix/post_operators
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc7
-rw-r--r--src/components/application_manager/src/hmi_language_handler.cc7
3 files changed, 15 insertions, 6 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc
index 1c504150fc..3c25ff5386 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc
@@ -88,9 +88,12 @@ void OnTTSLanguageChangeNotification::Run() {
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
- const ApplicationSet& applications =
+ const ApplicationSet& accessor =
application_manager_.applications().GetData();
- for (auto app : applications) {
+ ApplicationSetIt it = accessor.begin();
+ for (; accessor.end() != it;) {
+ ApplicationSharedPtr app = *it;
+ ++it;
(*message_)[strings::params][strings::connection_key] = app->app_id();
SendNotificationToMobile(message_);
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc
index 6780b13e1a..7f6ffaa4eb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc
@@ -80,10 +80,13 @@ void OnUILanguageChangeNotification::Run() {
(*message_)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID);
- const ApplicationSet& applications =
+ const ApplicationSet& accessor =
application_manager_.applications().GetData();
- for (auto app : applications) {
+ ApplicationSetConstIt it = accessor.begin();
+ for (; accessor.end() != it;) {
+ ApplicationSharedPtr app = *it;
+ ++it;
(*message_)[strings::params][strings::connection_key] = app->app_id();
SendNotificationToMobile(message_);
diff --git a/src/components/application_manager/src/hmi_language_handler.cc b/src/components/application_manager/src/hmi_language_handler.cc
index 451ddab3d2..2d9c7cb48a 100644
--- a/src/components/application_manager/src/hmi_language_handler.cc
+++ b/src/components/application_manager/src/hmi_language_handler.cc
@@ -261,10 +261,13 @@ void HMILanguageHandler::VerifyWithPersistedLanguages() {
"Some languages gotten from HMI have "
"mismatch with persisted values.");
- const ApplicationSet& applications =
+ const ApplicationSet& accessor =
application_manager_.applications().GetData();
- for (auto app : applications) {
+ ApplicationSetIt it = accessor.begin();
+ for (; accessor.end() != it;) {
+ ApplicationConstSharedPtr app = *it;
+ ++it;
SDL_LOG_INFO("Application with app_id "
<< app->app_id()
<< " will be unregistered because of "