diff options
author | Jacob Keeler <jacob.keeler@livioradio.com> | 2016-07-28 14:07:12 -0400 |
---|---|---|
committer | Jacob Keeler <jacob.keeler@livioradio.com> | 2016-07-28 14:49:09 -0400 |
commit | 3de04b8ff1b22a691fc20ed299a05ce0c843b186 (patch) | |
tree | 6a9ed10c61eff7d79981085cb352ebcaf9989c81 /src/components | |
parent | 8e96ae215ce1c0753db59ca9e1869c7af374b01c (diff) | |
download | sdl_core-3de04b8ff1b22a691fc20ed299a05ce0c843b186.tar.gz |
Fixed style issues
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/application_manager/src/commands/mobile/register_app_interface_request.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc index 259d053044..67aeef0647 100644 --- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc +++ b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc @@ -36,7 +36,6 @@ #include <unistd.h> #include <algorithm> #include <map> -#include <stdexcept> #include <string.h> #include "application_manager/application_manager_impl.h" @@ -87,11 +86,13 @@ std::string AppHMITypeToString(mobile_apis::AppHMIType::eType type) { {mobile_apis::AppHMIType::TESTING, "TESTING"}, {mobile_apis::AppHMIType::SYSTEM, "SYSTEM"} }; - try { - return appHMITypeMap.at(type); - } - catch (const std::out_of_range &ex) { + + std::map<mobile_apis::AppHMIType::eType, std::string>::const_iterator iter = + appHMITypeMap.find(type); + if (appHMITypeMap.end() == iter) { return ""; + } else { + return iter->second; } } @@ -116,7 +117,8 @@ struct CheckMissedTypes { : policy_app_types_(policy_app_types), log_(log) {} bool operator()(const smart_objects::SmartArray::value_type &value) { - std::string app_type_str = AppHMITypeToString(static_cast<mobile_apis::AppHMIType::eType>(value.asInt())); + std::string app_type_str = AppHMITypeToString( + static_cast<mobile_apis::AppHMIType::eType>(value.asInt())); if (!app_type_str.empty()) { policy::StringArray::const_iterator it = policy_app_types_.begin(); policy::StringArray::const_iterator it_end = policy_app_types_.end(); |