summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin <iCollin@users.noreply.github.com>2021-04-20 10:29:07 -0400
committerGitHub <noreply@github.com>2021-04-20 10:29:07 -0400
commit08d12403dd73b4fc374969e644ef1391bfdc5316 (patch)
tree40784693da7752dd507b7a3556396769c8b7ed71
parentd7c804de1e5bc90f9359ea21b9d9c54de70bb947 (diff)
downloadsdl_core-08d12403dd73b4fc374969e644ef1391bfdc5316.tar.gz
replace applicable post-operators to pre-operators (#3687)
* replace applicable X++ with ++X * replace applicable X-- with --X * change for loop updates
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc8
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_tts_language_change_notification.cc3
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_ui_language_change_notification.cc3
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc15
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc3
-rw-r--r--src/components/application_manager/src/app_launch/app_launch_data_json.cc2
-rw-r--r--src/components/application_manager/src/application_data_impl.cc2
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc8
-rw-r--r--src/components/application_manager/src/hmi_language_handler.cc5
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc2
-rw-r--r--src/components/application_manager/src/request_controller.cc6
-rw-r--r--src/components/application_manager/src/request_info.cc2
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_processor_impl.cc2
-rw-r--r--src/components/application_manager/src/rpc_passing_handler.cc4
-rw-r--r--src/components/config_profile/src/ini_file.cc38
-rw-r--r--src/components/config_profile/src/profile.cc6
-rw-r--r--src/components/formatters/src/CFormatterJsonBase.cc6
-rw-r--r--src/components/include/transport_manager/transport_adapter/device.h2
-rw-r--r--src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc4
-rw-r--r--src/components/protocol_handler/src/protocol_handler_impl.cc6
-rw-r--r--src/components/security_manager/src/crypto_manager_impl.cc6
-rw-r--r--src/components/smart_objects/include/smart_objects/enum_schema_item.h2
-rw-r--r--src/components/smart_objects/src/array_schema_item.cc2
-rw-r--r--src/components/smart_objects/src/object_schema_item.cc2
-rw-r--r--src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc2
-rw-r--r--src/components/utils/src/lock_boost.cc8
42 files changed, 100 insertions, 91 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc
index 5a1815d974..1b8c5bfd1d 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/app_service_app_extension.cc
@@ -91,7 +91,7 @@ void AppServiceAppExtension::SaveResumptionData(
int i = 0;
for (const auto& subscription : subscribed_data_) {
resumption_data[app_mngr::hmi_interface::app_service][i] = subscription;
- i++;
+ ++i;
}
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
index 32fccb0192..989c606085 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
@@ -92,7 +92,7 @@ void ASGetAppServiceDataRequestFromHMI::GetWeatherImagePaths(
if (data.keyExists(strings::minute_forecast)) {
smart_objects::SmartObject& minute_forecast =
data[strings::minute_forecast];
- for (size_t i = 0; i < minute_forecast.length(); i++) {
+ for (size_t i = 0; i < minute_forecast.length(); ++i) {
if (minute_forecast[i].keyExists(strings::weather_icon)) {
MessageHelper::VerifyImage(minute_forecast[i][strings::weather_icon],
app,
@@ -104,7 +104,7 @@ void ASGetAppServiceDataRequestFromHMI::GetWeatherImagePaths(
if (data.keyExists(strings::hourly_forecast)) {
smart_objects::SmartObject& hourly_forecast =
data[strings::hourly_forecast];
- for (size_t i = 0; i < hourly_forecast.length(); i++) {
+ for (size_t i = 0; i < hourly_forecast.length(); ++i) {
if (hourly_forecast[i].keyExists(strings::weather_icon)) {
MessageHelper::VerifyImage(hourly_forecast[i][strings::weather_icon],
app,
@@ -116,7 +116,7 @@ void ASGetAppServiceDataRequestFromHMI::GetWeatherImagePaths(
if (data.keyExists(strings::multiday_forecast)) {
smart_objects::SmartObject& multiday_forecast =
data[strings::multiday_forecast];
- for (size_t i = 0; i < multiday_forecast.length(); i++) {
+ for (size_t i = 0; i < multiday_forecast.length(); ++i) {
if (multiday_forecast[i].keyExists(strings::weather_icon)) {
MessageHelper::VerifyImage(multiday_forecast[i][strings::weather_icon],
app,
@@ -145,7 +145,7 @@ void ASGetAppServiceDataRequestFromHMI::GetNavigationImagePaths(
if (data.keyExists(strings::instructions)) {
smart_objects::SmartObject& instructions = data[strings::instructions];
- for (size_t i = 0; i < instructions.length(); i++) {
+ for (size_t i = 0; i < instructions.length(); ++i) {
if (instructions[i].keyExists(strings::image)) {
MessageHelper::VerifyImage(
instructions[i][strings::image], app, application_manager_);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc
index ac3666bf2e..843971e16d 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_records_request.cc
@@ -75,7 +75,7 @@ void ASGetAppServiceRecordsRequest::Run() {
continue;
}
records[index] = record;
- index++;
+ ++index;
}
if (!records.empty()) {
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
index 0f1fbcf1ce..15b5e093a5 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
@@ -84,7 +84,7 @@ void OnASAppServiceDataNotification::GetWeatherImagePaths(
if (data.keyExists(strings::minute_forecast)) {
smart_objects::SmartObject& minute_forecast =
data[strings::minute_forecast];
- for (size_t i = 0; i < minute_forecast.length(); i++) {
+ for (size_t i = 0; i < minute_forecast.length(); ++i) {
if (minute_forecast[i].keyExists(strings::weather_icon)) {
MessageHelper::VerifyImage(minute_forecast[i][strings::weather_icon],
app,
@@ -96,7 +96,7 @@ void OnASAppServiceDataNotification::GetWeatherImagePaths(
if (data.keyExists(strings::hourly_forecast)) {
smart_objects::SmartObject& hourly_forecast =
data[strings::hourly_forecast];
- for (size_t i = 0; i < hourly_forecast.length(); i++) {
+ for (size_t i = 0; i < hourly_forecast.length(); ++i) {
if (hourly_forecast[i].keyExists(strings::weather_icon)) {
MessageHelper::VerifyImage(hourly_forecast[i][strings::weather_icon],
app,
@@ -108,7 +108,7 @@ void OnASAppServiceDataNotification::GetWeatherImagePaths(
if (data.keyExists(strings::multiday_forecast)) {
smart_objects::SmartObject& multiday_forecast =
data[strings::multiday_forecast];
- for (size_t i = 0; i < multiday_forecast.length(); i++) {
+ for (size_t i = 0; i < multiday_forecast.length(); ++i) {
if (multiday_forecast[i].keyExists(strings::weather_icon)) {
MessageHelper::VerifyImage(multiday_forecast[i][strings::weather_icon],
app,
@@ -137,7 +137,7 @@ void OnASAppServiceDataNotification::GetNavigationImagePaths(
if (data.keyExists(strings::instructions)) {
smart_objects::SmartObject& instructions = data[strings::instructions];
- for (size_t i = 0; i < instructions.length(); i++) {
+ for (size_t i = 0; i < instructions.length(); ++i) {
if (instructions[i].keyExists(strings::image)) {
MessageHelper::VerifyImage(
instructions[i][strings::image], app, application_manager_);
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc
index a13a7f2a9e..b2b164b9ad 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_consent_request.cc
@@ -116,7 +116,7 @@ void GetInteriorVehicleDataConsentRequest::Execute() {
module_ids_for_consent->clear();
auto module_ids = msg_params[message_params::kModuleIds].asArray();
- for (uint32_t i = 0; i < module_ids->size(); i++) {
+ for (uint32_t i = 0; i < module_ids->size(); ++i) {
// Only add modules whose consent is unknown(needs to be sent to the hmi)
bool is_consent_undefined =
(*hmi_request_consents_.asArray())[i].getType() ==
@@ -207,7 +207,7 @@ void GetInteriorVehicleDataConsentRequest::on_event(
consent.getType() == smart_objects::SmartType::SmartType_Null;
if (is_consent_undefined) {
consent = (*response_consents)[response_consents_counter];
- response_consents_counter++;
+ ++response_consents_counter;
}
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc
index ff9d861def..613dfc24a3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/navi_set_video_config_request.cc
@@ -106,7 +106,7 @@ void NaviSetVideoConfigRequest::on_event(const event_engine::Event& event) {
const smart_objects::SmartArray* list =
message[strings::msg_params][strings::rejected_params].asArray();
if (list != NULL) {
- for (unsigned int i = 0; i < list->size(); i++) {
+ for (unsigned int i = 0; i < list->size(); ++i) {
const std::string& param = (*list)[i].asString();
// Make sure that we actually sent the parameter in the request
if ((*message_)[strings::msg_params].keyExists(strings::config) &&
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
index 9caec22bd2..ed2b36b413 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
@@ -134,7 +134,7 @@ void OnBCSystemCapabilityUpdatedNotification::Run() {
smart_objects::SmartObject& updated_capabilities =
msg_params[strings::system_capability]
[strings::app_services_capabilities][strings::app_services];
- for (size_t i = 0; i < updated_capabilities.length(); i++) {
+ for (size_t i = 0; i < updated_capabilities.length(); ++i) {
std::string service_id =
updated_capabilities[i][strings::updated_app_service_record]
[strings::service_id]
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 f652761178..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
@@ -92,7 +92,8 @@ void OnTTSLanguageChangeNotification::Run() {
application_manager_.applications().GetData();
ApplicationSetIt it = accessor.begin();
for (; accessor.end() != it;) {
- ApplicationSharedPtr app = *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 2f2cb2ddc6..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
@@ -85,7 +85,8 @@ void OnUILanguageChangeNotification::Run() {
ApplicationSetConstIt it = accessor.begin();
for (; accessor.end() != it;) {
- ApplicationSharedPtr app = *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/sdl_get_policy_configuration_data_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc
index 7478a40eeb..f366da82d6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/sdl_get_policy_configuration_data_request.cc
@@ -144,7 +144,7 @@ smart_objects::SmartObject SDLGetPolicyConfigurationDataRequest::GetValueParam(
};
if (policy_property.type() == Json::arrayValue) {
- for (Json::ArrayIndex i = 0; i < policy_property.size(); i++) {
+ for (Json::ArrayIndex i = 0; i < policy_property.size(); ++i) {
put_element_in_value_array(policy_property[i], i);
}
return value;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
index 9f04541b46..5d1a058f16 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
@@ -325,14 +325,14 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
hmi_apis::Common_TextFieldName::alertText1;
msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::alert_text1];
- index++;
+ ++index;
}
if ((*message_)[strings::msg_params].keyExists(strings::alert_text2)) {
msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
hmi_apis::Common_TextFieldName::alertText2;
msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::alert_text2];
- index++;
+ ++index;
}
if ((*message_)[strings::msg_params].keyExists(strings::alert_text3)) {
msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
index 0d1d876497..f3e0b67921 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc
@@ -364,7 +364,7 @@ bool CreateInteractionChoiceSetRequest::ProcessSuccesfulHMIResponse(
}
void CreateInteractionChoiceSetRequest::CountReceivedVRResponses() {
- received_chs_count_++;
+ ++received_chs_count_;
SDL_LOG_DEBUG("Got VR.AddCommand response, there are "
<< expected_chs_count_ - received_chs_count_
<< " more to wait.");
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
index 1f15170ffe..92b381456f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
@@ -96,7 +96,7 @@ void OnSystemCapabilityUpdatedNotification::Run() {
smart_objects::SmartObject& updated_capabilities =
msg_params[strings::system_capability]
[strings::app_services_capabilities][strings::app_services];
- for (size_t i = 0; i < updated_capabilities.length(); i++) {
+ for (size_t i = 0; i < updated_capabilities.length(); ++i) {
std::string service_id =
updated_capabilities[i][strings::updated_app_service_record]
[strings::service_id]
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
index 40705491fc..af0a5a6539 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc
@@ -228,7 +228,7 @@ size_t OnSystemRequestNotification::ParsePTString(
if (pt_string[i] == '\"' || pt_string[i] == '\\') {
result += '\\';
} else if (pt_string[i] == '\n') {
- result_length--; // contentLength is adjusted when this character is
+ --result_length; // contentLength is adjusted when this character is
// not copied to result.
continue;
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc
index cfb9d5896e..e8dbe579c5 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_request.cc
@@ -132,8 +132,9 @@ void ShowConstantTBTRequest::Run() {
msg_params.erase(strings::navigation_text_1);
msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
static_cast<int32_t>(hmi_apis::Common_TextFieldName::navigationText1);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::navigation_text_1];
+ ++index;
}
if (msg_params.keyExists(strings::navigation_text_2)) {
@@ -141,8 +142,9 @@ void ShowConstantTBTRequest::Run() {
msg_params.erase(strings::navigation_text_2);
msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
static_cast<int32_t>(hmi_apis::Common_TextFieldName::navigationText2);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::navigation_text_2];
+ ++index;
}
if (msg_params.keyExists(strings::eta)) {
@@ -150,8 +152,9 @@ void ShowConstantTBTRequest::Run() {
msg_params.erase(strings::eta);
msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
static_cast<int32_t>(hmi_apis::Common_TextFieldName::ETA);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::eta];
+ ++index;
}
if (msg_params.keyExists(strings::total_distance)) {
@@ -159,8 +162,9 @@ void ShowConstantTBTRequest::Run() {
msg_params.erase(strings::total_distance);
msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
static_cast<int32_t>(hmi_apis::Common_TextFieldName::totalDistance);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::total_distance];
+ ++index;
}
if (msg_params.keyExists(strings::time_to_destination)) {
@@ -168,8 +172,9 @@ void ShowConstantTBTRequest::Run() {
msg_params.erase(strings::time_to_destination);
msg_params[hmi_request::navi_texts][index][hmi_request::field_name] =
static_cast<int32_t>(hmi_apis::Common_TextFieldName::timeToDestination);
- msg_params[hmi_request::navi_texts][index++][hmi_request::field_text] =
+ msg_params[hmi_request::navi_texts][index][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::time_to_destination];
+ ++index;
}
if (msg_params.keyExists(strings::soft_buttons)) {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc
index 1a54f7f106..2a8e267436 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subtle_alert_request.cc
@@ -336,7 +336,7 @@ void SubtleAlertRequest::SendSubtleAlertRequest(int32_t app_id) {
hmi_apis::Common_TextFieldName::subtleAlertText1;
msg_params[hmi_request::alert_strings][index][hmi_request::field_text] =
(*message_)[strings::msg_params][strings::alert_text1];
- index++;
+ ++index;
}
if ((*message_)[strings::msg_params].keyExists(strings::alert_text2)) {
msg_params[hmi_request::alert_strings][index][hmi_request::field_name] =
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc
index 311ba5d4aa..117e65d2cb 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/extensions/system_capability_app_extension.cc
@@ -63,7 +63,7 @@ void SystemCapabilityAppExtension::SaveResumptionData(
int i = 0;
for (const auto& subscription : subscribed_data_) {
resumption_data[strings::system_capability][i] = subscription;
- i++;
+ ++i;
}
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
index e5656d60c5..17a450ca89 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/get_vehicle_data_request.cc
@@ -91,7 +91,7 @@ void GetVehicleDataRequest::Run() {
continue;
}
hmi_msg_params[name] = msg_params[name];
- params_count++;
+ ++params_count;
}
const int minimal_params_count = 1;
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
index 60dea0a24b..e062728217 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/on_vehicle_data_notification.cc
@@ -103,7 +103,7 @@ void OnVehicleDataNotification::Run() {
}
}
- for (size_t idx = 0; idx < notify_apps.size(); idx++) {
+ for (size_t idx = 0; idx < notify_apps.size(); ++idx) {
CommandParametersPermissions params_permissions;
application_manager_.CheckPolicyPermissions(
notify_apps[idx],
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
index af9d605ff0..c1cf905e31 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/custom_vehicle_data_manager_impl.cc
@@ -114,7 +114,7 @@ void CustomVehicleDataManagerImpl::CreateMobileMessageParams(
auto& input_param = input_params[key];
if (*schema->array &&
input_param.getType() == smart_objects::SmartType_Array) {
- for (size_t i = 0; i < input_param.length(); i++) {
+ for (size_t i = 0; i < input_param.length(); ++i) {
const auto param =
fill_mobile_msg(input_param[i], SearchMethod::RECURSIVE);
out_params[item_name][i] = param;
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
index dd6d797e39..1b503ff943 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
@@ -138,7 +138,8 @@ void VehicleInfoAppExtension::SaveResumptionData(
int i = 0;
sync_primitives::AutoLock lock(*subscribed_data_lock_);
for (const auto& subscription : subscribed_data_) {
- resumption_data[strings::application_vehicle_info][i++] = subscription;
+ resumption_data[strings::application_vehicle_info][i] = subscription;
+ ++i;
}
}
diff --git a/src/components/application_manager/src/app_launch/app_launch_data_json.cc b/src/components/application_manager/src/app_launch/app_launch_data_json.cc
index d618e63e15..ed0fc37974 100644
--- a/src/components/application_manager/src/app_launch/app_launch_data_json.cc
+++ b/src/components/application_manager/src/app_launch/app_launch_data_json.cc
@@ -257,7 +257,7 @@ bool AppLaunchDataJson::DeleteOldestAppData() {
// Copy in temporary vector Json list without oldest record
int32_t i = 0;
- for (auto it = apps_list.begin(); it != apps_list.end(); ++it, i++) {
+ for (auto it = apps_list.begin(); it != apps_list.end(); ++it, ++i) {
if ((*it).isMember(strings::device_id) &&
(*it).isMember(strings::bundle_id) && (*it).isMember(strings::app_id) &&
(*it).isMember(strings::app_launch_last_session)) {
diff --git a/src/components/application_manager/src/application_data_impl.cc b/src/components/application_manager/src/application_data_impl.cc
index 8f7a1e2815..e190025add 100644
--- a/src/components/application_manager/src/application_data_impl.cc
+++ b/src/components/application_manager/src/application_data_impl.cc
@@ -611,7 +611,7 @@ void DynamicApplicationDataImpl::set_display_capabilities(
} else if (window_id == 0) {
return index;
}
- index++;
+ ++index;
}
return -1;
};
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 475baae9ec..c7bb4b3210 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -1119,7 +1119,7 @@ void ApplicationManagerImpl::RefreshCloudAppInformation() {
}
// Delete the cloud device
connection_handler().RemoveCloudAppDevice(app->device());
- removed_app_count++;
+ ++removed_app_count;
}
// Update app list if disabled apps were removed
@@ -1364,7 +1364,7 @@ ApplicationManagerImpl::GetCloudAppConnectionStatus(
uint32_t ApplicationManagerImpl::GetNextMobileCorrelationID() {
if (mobile_correlation_id_ < max_correlation_id_) {
- mobile_correlation_id_++;
+ ++mobile_correlation_id_;
} else {
mobile_correlation_id_ = 0;
}
@@ -1374,7 +1374,7 @@ uint32_t ApplicationManagerImpl::GetNextMobileCorrelationID() {
uint32_t ApplicationManagerImpl::GetNextHMICorrelationID() {
if (correlation_id_ < max_correlation_id_) {
- correlation_id_++;
+ ++correlation_id_;
} else {
correlation_id_ = 0;
}
@@ -1848,7 +1848,7 @@ bool ApplicationManagerImpl::CheckResumptionRequiredTransportAvailable(
return false;
} else {
// check all AppHMITypes that the app has
- for (size_t i = 0; i < app_types_array->length(); i++) {
+ for (size_t i = 0; i < app_types_array->length(); ++i) {
std::string app_type_string =
EnumToString(static_cast<mobile_apis::AppHMIType::eType>(
app_types_array->getElement(i).asUInt()));
diff --git a/src/components/application_manager/src/hmi_language_handler.cc b/src/components/application_manager/src/hmi_language_handler.cc
index 750755478e..2d9c7cb48a 100644
--- a/src/components/application_manager/src/hmi_language_handler.cc
+++ b/src/components/application_manager/src/hmi_language_handler.cc
@@ -263,10 +263,11 @@ void HMILanguageHandler::VerifyWithPersistedLanguages() {
const ApplicationSet& accessor =
application_manager_.applications().GetData();
+
ApplicationSetIt it = accessor.begin();
for (; accessor.end() != it;) {
- ApplicationConstSharedPtr app = *it++;
-
+ ApplicationConstSharedPtr app = *it;
+ ++it;
SDL_LOG_INFO("Application with app_id "
<< app->app_id()
<< " will be unregistered because of "
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index b25e07c8f3..488a5f6eef 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -520,7 +520,7 @@ smart_objects::SmartObject MessageHelper::CreateAppServiceCapabilities(
smart_objects::SmartType_Map);
app_service_capability[strings::updated_app_service_record] = record;
app_services[i] = app_service_capability;
- i++;
+ ++i;
}
app_service_capabilities[strings::app_services] = app_services;
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc
index a34457ff66..d94bb0e4df 100644
--- a/src/components/application_manager/src/request_controller.cc
+++ b/src/components/application_manager/src/request_controller.cc
@@ -80,7 +80,7 @@ void RequestController::InitializeThreadpool() {
// TODO(DK): Consider lazy loading threads instead of creating all at once
pool_state_ = TPoolState::STARTED;
char name[50];
- for (uint32_t i = 0; i < pool_size_; i++) {
+ for (uint32_t i = 0; i < pool_size_; ++i) {
snprintf(name, sizeof(name) / sizeof(name[0]), "AM Pool %u", i);
pool_.push_back(threads::CreateThread(name, new Worker(this)));
pool_[i]->Start();
@@ -96,7 +96,7 @@ void RequestController::DestroyThreadpool() {
SDL_LOG_DEBUG("Broadcasting STOP signal to all threads...");
cond_var_.Broadcast(); // notify all threads we are shutting down
}
- for (size_t i = 0; i < pool_.size(); i++) {
+ for (size_t i = 0; i < pool_.size(); ++i) {
threads::Thread* thread = pool_[i];
thread->Stop(threads::Thread::kThreadSoftStop);
delete thread->GetDelegate();
@@ -246,7 +246,7 @@ void RequestController::TerminateRequest(const uint32_t correlation_id,
AutoLock auto_lock(duplicate_message_count_lock_);
auto dup_it = duplicate_message_count_.find(correlation_id);
if (duplicate_message_count_.end() != dup_it) {
- duplicate_message_count_[correlation_id]--;
+ --duplicate_message_count_[correlation_id];
if (0 == duplicate_message_count_[correlation_id]) {
duplicate_message_count_.erase(dup_it);
}
diff --git a/src/components/application_manager/src/request_info.cc b/src/components/application_manager/src/request_info.cc
index e1fffdf6fe..b1c1d68eaa 100644
--- a/src/components/application_manager/src/request_info.cc
+++ b/src/components/application_manager/src/request_info.cc
@@ -244,7 +244,7 @@ uint32_t RequestInfoSet::RemoveRequests(
HashSortedRequestInfoSet::iterator to_erase = it++;
Erase(*to_erase);
it = std::find_if(it, hash_sorted_pending_requests_.end(), filter);
- erased++;
+ ++erased;
}
CheckSetSizes();
return erased;
diff --git a/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc b/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
index dffb1ea094..5c18ef4b9b 100644
--- a/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_processor_impl.cc
@@ -975,7 +975,7 @@ void ResumptionDataProcessorImpl::DeletePluginsSubscriptions(
smart_objects::SmartObject(smart_objects::SmartType_Map);
module_data_so[index][message_params::kModuleType] = module.first;
module_data_so[index][message_params::kModuleId] = module.second;
- index++;
+ ++index;
}
}
diff --git a/src/components/application_manager/src/rpc_passing_handler.cc b/src/components/application_manager/src/rpc_passing_handler.cc
index 74a865ff4f..b2ac58c4f7 100644
--- a/src/components/application_manager/src/rpc_passing_handler.cc
+++ b/src/components/application_manager/src/rpc_passing_handler.cc
@@ -85,7 +85,7 @@ bool RPCPassingHandler::CanHandleFunctionID(int32_t function_id) {
for (auto it = services.begin(); it != services.end(); ++it) {
auto handled_rpcs =
it->record[strings::service_manifest][strings::handled_rpcs];
- for (size_t i = 0; i < handled_rpcs.length(); i++) {
+ for (size_t i = 0; i < handled_rpcs.length(); ++i) {
if (handled_rpcs[i].asInt() == function_id) {
return true;
}
@@ -266,7 +266,7 @@ void RPCPassingHandler::PopulateRPCRequestQueue(
++services_it) {
auto handled_rpcs =
services_it->record[strings::service_manifest][strings::handled_rpcs];
- for (size_t i = 0; i < handled_rpcs.length(); i++) {
+ for (size_t i = 0; i < handled_rpcs.length(); ++i) {
if (handled_rpcs[i].asInt() == function_id) {
// Add requests to queue
ServiceInfo service_info{
diff --git a/src/components/config_profile/src/ini_file.cc b/src/components/config_profile/src/ini_file.cc
index dd64f48afa..f5817896bf 100644
--- a/src/components/config_profile/src/ini_file.cc
+++ b/src/components/config_profile/src/ini_file.cc
@@ -118,7 +118,7 @@ char* ini_read_value(const char* fname,
return NULL;
snprintf(tag, INI_LINE_LEN, "%s", chapter);
- for (uint32_t i = 0; i < strlen(tag); i++) {
+ for (uint32_t i = 0; i < strlen(tag); ++i) {
tag[i] = toupper(tag[i]);
}
@@ -130,7 +130,7 @@ char* ini_read_value(const char* fname,
chapter_found = true;
snprintf(tag, INI_LINE_LEN, "%s", item);
- for (uint32_t i = 0; i < strlen(tag); i++)
+ for (uint32_t i = 0; i < strlen(tag); ++i)
tag[i] = toupper(tag[i]);
}
} else {
@@ -216,7 +216,7 @@ char ini_write_value(const char* fname,
#endif // #else #if USE_MKSTEMP
snprintf(tag, INI_LINE_LEN, "%s", chapter);
- for (uint32_t i = 0; i < strlen(tag); i++)
+ for (uint32_t i = 0; i < strlen(tag); ++i)
tag[i] = toupper(tag[i]);
wr_result = 1;
@@ -231,7 +231,7 @@ char ini_write_value(const char* fname,
chapter_found = true;
// coding style
snprintf(tag, INI_LINE_LEN, "%s", item);
- for (uint32_t i = 0; i < strlen(tag); i++)
+ for (uint32_t i = 0; i < strlen(tag); ++i)
tag[i] = toupper(tag[i]);
}
} else {
@@ -244,7 +244,7 @@ char ini_write_value(const char* fname,
first chapter is significant */
value_written = true;
} else if (result == INI_RIGHT_ITEM) {
- for (uint16_t i = 0; i < cr_count; i++)
+ for (uint16_t i = 0; i < cr_count; ++i)
fprintf(wr_fp, "\n");
cr_count = 0;
wr_result = fprintf(wr_fp, "%s=%s\n", item, value);
@@ -255,9 +255,9 @@ char ini_write_value(const char* fname,
} /* if (!value_written) */
if (0 == strcmp(val, "\n")) {
- cr_count++;
+ ++cr_count;
} else {
- for (uint32_t i = 0; i < cr_count; i++)
+ for (uint32_t i = 0; i < cr_count; ++i)
fprintf(wr_fp, "\n");
cr_count = 0;
wr_result = fprintf(wr_fp, "%s", line);
@@ -297,11 +297,11 @@ Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
/* cut leading spaces */
line_ptr = line;
- for (uint32_t i = 0; i < strlen(line); i++) {
+ for (uint32_t i = 0; i < strlen(line); ++i) {
if ((line[i] == ' ') || (line[i] == 9) || // TAB
(line[i] == 10) || // LF
(line[i] == 13)) { // CR
- line_ptr++;
+ ++line_ptr;
} else {
break;
}
@@ -315,15 +315,15 @@ Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
return INI_REMARK;
if (*line_ptr == '[' && strrchr(line_ptr, ']') != NULL) {
- line_ptr++;
+ ++line_ptr;
/* cut leading stuff */
uint16_t len = strlen(line_ptr);
- for (int32_t i = 0; i < len; i++) {
+ for (int32_t i = 0; i < len; ++i) {
if ((*line_ptr == ' ') || (*line_ptr == 9) || // TAB
(*line_ptr == 10) || // LF
(*line_ptr == 13)) { // CR
- line_ptr++;
+ ++line_ptr;
} else {
break;
}
@@ -340,7 +340,7 @@ Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
}
/* cut trailing stuff */
- for (int32_t i = strlen(temp_str) - 1; i > 0; i--) {
+ for (int32_t i = strlen(temp_str) - 1; i > 0; --i) {
if ((temp_str[i] == ' ') || (temp_str[i] == 9) || // TAB
(temp_str[i] == 10) || // LF
(temp_str[i] == 13)) { // CR
@@ -352,7 +352,7 @@ Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
snprintf(value, INI_LINE_LEN, "%s", temp_str);
- for (uint32_t i = 0; i < strlen(temp_str); i++)
+ for (uint32_t i = 0; i < strlen(temp_str); ++i)
temp_str[i] = toupper(temp_str[i]);
if (strcmp(temp_str, tag) == 0)
return INI_RIGHT_CHAPTER;
@@ -363,7 +363,7 @@ Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
if (NULL != strchr(line_ptr, '=')) {
strncpy(temp_str, line_ptr, (strchr(line_ptr, '=') - line_ptr));
/* cut trailing stuff */
- for (int32_t i = strlen(temp_str) - 1; i > 0; i--) {
+ for (int32_t i = strlen(temp_str) - 1; i > 0; --i) {
if ((temp_str[i] == '=') || (temp_str[i] == ' ') ||
(temp_str[i] == 9) || // TAB
(temp_str[i] == 10) || // LF
@@ -376,17 +376,17 @@ Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
snprintf(value, INI_LINE_LEN, "%s", temp_str);
- for (uint32_t i = 0; i < strlen(temp_str); i++)
+ for (uint32_t i = 0; i < strlen(temp_str); ++i)
temp_str[i] = toupper(temp_str[i]);
if (strcmp(temp_str, tag) == 0) {
line_ptr = strchr(line_ptr, '=') + 1;
uint16_t len = strlen(line_ptr);
/* cut trailing stuff */
- for (uint32_t i = 0; i < len; i++) {
+ for (uint32_t i = 0; i < len; ++i) {
if ((*line_ptr == ' ') || (*line_ptr == 9) || // TAB
(*line_ptr == 10) || // LF
(*line_ptr == 13)) { // CR
- line_ptr++;
+ ++line_ptr;
} else {
break;
}
@@ -396,7 +396,7 @@ Ini_search_id ini_parse_line(const char* line, const char* tag, char* value) {
if (value[0] != '\0') {
/* cut trailing stuff */
- for (int32_t i = strlen(value) - 1; i > 0; i--) {
+ for (int32_t i = strlen(value) - 1; i > 0; --i) {
if ((value[i] == ' ') || (value[i] == ';') ||
(value[i] == 9) || // TAB
(value[i] == 10) || // LF
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index dd4ecab2b7..7836e0c755 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -2361,7 +2361,7 @@ void Profile::UpdateValues() {
entry->ini_key_name,
kTransportRequiredForResumptionSection);
}
- entry++;
+ ++entry;
}
}
@@ -2561,7 +2561,7 @@ void Profile::UpdateValues() {
LOG_UPDATED_VALUE(
list_with_comma, entry->ini_key_name, entry->ini_section_name);
}
- entry++;
+ ++entry;
}
}
@@ -2599,7 +2599,7 @@ void Profile::UpdateValues() {
LOG_UPDATED_VALUE(
list_with_comma, entry->ini_key_name, entry->ini_section_name);
}
- entry++;
+ ++entry;
}
}
}
diff --git a/src/components/formatters/src/CFormatterJsonBase.cc b/src/components/formatters/src/CFormatterJsonBase.cc
index d88ffc7158..4e67d5dcbe 100644
--- a/src/components/formatters/src/CFormatterJsonBase.cc
+++ b/src/components/formatters/src/CFormatterJsonBase.cc
@@ -45,14 +45,14 @@ void ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::
Json::Value::Members members = value.getMemberNames();
- for (uint32_t i = 0; i < members.size(); i++) {
+ for (uint32_t i = 0; i < members.size(); ++i) {
jsonValueToObj(value[members[i]], obj[members[i]]);
}
} else if (value.type() == Json::arrayValue) {
obj = ns_smart_device_link::ns_smart_objects::SmartObject(
ns_smart_device_link::ns_smart_objects::SmartType_Array);
- for (uint32_t i = 0; i < value.size(); i++) {
+ for (uint32_t i = 0; i < value.size(); ++i) {
jsonValueToObj(value[i], obj[i]);
}
} else if (value.type() == Json::intValue) {
@@ -81,7 +81,7 @@ void ns_smart_device_link::ns_json_handler::formatters::CFormatterJsonBase::
obj.getType()) {
item = Json::arrayValue;
- for (uint32_t i = 0; i < obj.length(); i++) {
+ for (uint32_t i = 0; i < obj.length(); ++i) {
Json::Value value(Json::nullValue);
objToJsonValue(obj.getElement(i), value);
diff --git a/src/components/include/transport_manager/transport_adapter/device.h b/src/components/include/transport_manager/transport_adapter/device.h
index 184616d714..770b55a347 100644
--- a/src/components/include/transport_manager/transport_adapter/device.h
+++ b/src/components/include/transport_manager/transport_adapter/device.h
@@ -163,7 +163,7 @@ class Device {
* @brief Increment @link retry_count_ @endlink value
*/
inline void next_retry() {
- retry_count_++;
+ ++retry_count_;
}
/**
diff --git a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
index d2634214fa..09ee931f40 100644
--- a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
+++ b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
@@ -111,7 +111,7 @@ void FromMicToFileRecorderThread::deinitArgs() {
SDL_LOG_AUTO_TRACE();
if (argv_) {
- for (int32_t i = 0; i < argc_; i++) {
+ for (int32_t i = 0; i < argc_; ++i) {
delete[] argv_[i];
}
delete[] argv_;
@@ -164,7 +164,7 @@ void FromMicToFileRecorderThread::threadMain() {
// g_option_context_parse() modifies params, so keep argc_ and argv_
int32_t argc = argc_;
gchar** argv = new gchar*[argc];
- for (int32_t i = 0; i < argc; i++) {
+ for (int32_t i = 0; i < argc; ++i) {
argv[i] = argv_[i];
}
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc
index ae1721c6c0..2595b26886 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -371,7 +371,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
BsonArray secondaryTransportsArr;
bson_array_initialize(&secondaryTransportsArr,
secondaryTransports.size());
- for (unsigned int i = 0; i < secondaryTransports.size(); i++) {
+ for (unsigned int i = 0; i < secondaryTransports.size(); ++i) {
char secondaryTransport[255];
strncpy(secondaryTransport,
secondaryTransports[i].c_str(),
@@ -389,7 +389,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
BsonArray audioServiceTransportsArr;
bson_array_initialize(&audioServiceTransportsArr,
audioServiceTransports.size());
- for (unsigned int i = 0; i < audioServiceTransports.size(); i++) {
+ for (unsigned int i = 0; i < audioServiceTransports.size(); ++i) {
SDL_LOG_DEBUG("Adding " << audioServiceTransports[i]
<< " to audioServiceTransports parameter "
"of StartSessionAck");
@@ -403,7 +403,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
BsonArray videoServiceTransportsArr;
bson_array_initialize(&videoServiceTransportsArr,
videoServiceTransports.size());
- for (unsigned int i = 0; i < videoServiceTransports.size(); i++) {
+ for (unsigned int i = 0; i < videoServiceTransports.size(); ++i) {
SDL_LOG_DEBUG("Adding " << videoServiceTransports[i]
<< " to videoServiceTransports parameter "
"of StartSessionAck");
diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc
index 717991cf5c..8d9755963c 100644
--- a/src/components/security_manager/src/crypto_manager_impl.cc
+++ b/src/components/security_manager/src/crypto_manager_impl.cc
@@ -91,7 +91,7 @@ CryptoManagerImpl::CryptoManagerImpl(
: settings_(set), context_(NULL) {
SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(instance_lock_);
- instance_count_++;
+ ++instance_count_;
if (instance_count_ == 1) {
SDL_LOG_DEBUG("Openssl engine initialization");
SSL_load_error_strings();
@@ -110,7 +110,7 @@ CryptoManagerImpl::~CryptoManagerImpl() {
} else {
SSL_CTX_free(context_);
}
- instance_count_--;
+ --instance_count_;
if (instance_count_ == 0) {
SDL_LOG_DEBUG("Openssl engine deinitialization");
EVP_cleanup();
@@ -251,7 +251,7 @@ bool CryptoManagerImpl::Init() {
#if OPENSSL_VERSION_NUMBER > OPENSSL1_1_VERSION
auto sk = SSL_CTX_get_ciphers(context_);
const char* p;
- for (int i = 0; i < sk_SSL_CIPHER_num(sk); i++) {
+ for (int i = 0; i < sk_SSL_CIPHER_num(sk); ++i) {
const SSL_CIPHER* c = sk_SSL_CIPHER_value(sk, i);
p = SSL_CIPHER_get_name(c);
if (p == NULL)
diff --git a/src/components/smart_objects/include/smart_objects/enum_schema_item.h b/src/components/smart_objects/include/smart_objects/enum_schema_item.h
index de4c3adcc8..07b4f38f62 100644
--- a/src/components/smart_objects/include/smart_objects/enum_schema_item.h
+++ b/src/components/smart_objects/include/smart_objects/enum_schema_item.h
@@ -296,7 +296,7 @@ template <typename EnumType>
const ElementSignature TEnumSchemaItem<EnumType>::getSignature(
const std::vector<ElementSignature>& signatures,
const utils::SemanticVersion& MessageVersion) {
- for (uint i = 0; i < signatures.size(); i++) {
+ for (uint i = 0; i < signatures.size(); ++i) {
ElementSignature signature = signatures[i];
// Check if signature matches message version
if (signature.mSince != boost::none &&
diff --git a/src/components/smart_objects/src/array_schema_item.cc b/src/components/smart_objects/src/array_schema_item.cc
index 3c28396213..fd8f3ce71d 100644
--- a/src/components/smart_objects/src/array_schema_item.cc
+++ b/src/components/smart_objects/src/array_schema_item.cc
@@ -146,7 +146,7 @@ void CArraySchemaItem::BuildObjectBySchema(const SmartObject& pattern_object,
if (SmartType_Array == pattern_object.getType()) {
const size_t array_len = pattern_object.length();
if (array_len > 0) {
- for (size_t i = 0u; i < array_len; i++) {
+ for (size_t i = 0u; i < array_len; ++i) {
mElementSchemaItem->BuildObjectBySchema(pattern_object.getElement(i),
result_object[i]);
}
diff --git a/src/components/smart_objects/src/object_schema_item.cc b/src/components/smart_objects/src/object_schema_item.cc
index 920d548c48..d22f1692c8 100644
--- a/src/components/smart_objects/src/object_schema_item.cc
+++ b/src/components/smart_objects/src/object_schema_item.cc
@@ -326,7 +326,7 @@ const SMember* CObjectSchemaItem::GetCorrectMember(
}
// Check for history tag items
if (!member.mHistoryVector.empty()) {
- for (uint i = 0; i < member.mHistoryVector.size(); i++) {
+ for (uint i = 0; i < member.mHistoryVector.size(); ++i) {
if (member.mHistoryVector[i].CheckHistoryFieldVersion(messageVersion)) {
return &member.mHistoryVector[i];
}
diff --git a/src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc b/src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc
index 402a103910..98c51d4aab 100644
--- a/src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc
+++ b/src/components/transport_manager/src/cloud/cloud_websocket_transport_adapter.cc
@@ -105,7 +105,7 @@ void CloudWebsocketTransportAdapter::CreateDevice(const std::string& uid) {
SDL_LOG_DEBUG("#Results: " << results.size());
std::string results_str;
- for (size_t i = 0; i < results.size(); i++) {
+ for (size_t i = 0; i < results.size(); ++i) {
results_str += " R[" + std::to_string(i) + "]:";
results_str +=
(results[i].length() != 0) ? results[i] : std::string("<EMPTY>");
diff --git a/src/components/utils/src/lock_boost.cc b/src/components/utils/src/lock_boost.cc
index 735b31d882..53b8dc3ace 100644
--- a/src/components/utils/src/lock_boost.cc
+++ b/src/components/utils/src/lock_boost.cc
@@ -72,7 +72,7 @@ void Lock::AssertFreeAndMarkTaken() {
SDL_LOG_FATAL("Locking already taken not recursive mutex");
NOTREACHED();
}
- lock_taken_++;
+ ++lock_taken_;
}
void Lock::AssertTakenAndMarkFree() {
@@ -80,7 +80,7 @@ void Lock::AssertTakenAndMarkFree() {
SDL_LOG_FATAL("Unlocking a mutex that is not taken");
NOTREACHED();
}
- lock_taken_--;
+ --lock_taken_;
}
// Recursive lock looks the same on the surface, some code duplication is
@@ -112,7 +112,7 @@ bool RecursiveLock::Try() {
}
void RecursiveLock::AssertFreeAndMarkTaken() {
- lock_taken_++;
+ ++lock_taken_;
}
void RecursiveLock::AssertTakenAndMarkFree() {
@@ -120,7 +120,7 @@ void RecursiveLock::AssertTakenAndMarkFree() {
SDL_LOG_FATAL("Unlocking a recursive mutex that is not taken");
NOTREACHED();
}
- lock_taken_--;
+ --lock_taken_;
}
} // namespace sync_primitives