summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Oleynik <aoleynik@luxoft.com>2016-07-18 14:58:49 +0300
committerAndrey Oleynik <aoleynik@luxoft.com>2016-07-18 14:58:49 +0300
commitd2f17e8efe863ef4998d8f4dc0385ccb3c747dc5 (patch)
tree2b22697bff47008f230120c820029e7829170c41
parentafae7eb7a0787cd291761a3d18c43e4d3eb02d1e (diff)
downloadsdl_core-d2f17e8efe863ef4998d8f4dc0385ccb3c747dc5.tar.gz
Removes odd calls to valid() and changed functor
Related-to:APPLINK-23987
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc b/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
index 84297f1bcd..30ea41e0b0 100644
--- a/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
+++ b/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
@@ -56,24 +56,24 @@ struct ForegroundApp
bool> {
bool operator()(
const SDLActivateAppRequest::V4ProtoApps::value_type ptr) const {
- return ptr.valid() ? ptr->is_foreground() : false;
+ return ptr ? ptr->is_foreground() : false;
}
};
struct SendLaunchApp
: std::unary_function<SDLActivateAppRequest::V4ProtoApps::value_type,
- bool> {
+ void> {
ApplicationConstSharedPtr app_to_launch_;
ApplicationManager& application_manager_;
SendLaunchApp(ApplicationConstSharedPtr app_to_launch, ApplicationManager& am)
: app_to_launch_(app_to_launch), application_manager_(am) {}
- bool operator()(
+ void operator()(
const SDLActivateAppRequest::V4ProtoApps::value_type ptr) const {
MessageHelper::SendLaunchApp((*ptr).app_id(),
app_to_launch_->SchemaUrl(),
app_to_launch_->PackageName(),
application_manager_);
- return true;
+ return;
}
};
}
@@ -129,7 +129,7 @@ void SDLActivateAppRequest::Run() {
ApplicationSharedPtr foreground_v4_app = get_foreground_app(device_handle);
V4ProtoApps v4_proto_apps = get_v4_proto_apps(device_handle);
- if (!foreground_v4_app.valid() && v4_proto_apps.empty()) {
+ if (!foreground_v4_app && v4_proto_apps.empty()) {
LOG4CXX_ERROR(logger_,
"Can't find regular foreground app with the same "
"connection id:"
@@ -142,7 +142,7 @@ void SDLActivateAppRequest::Run() {
"Application is not registered yet. "
"Sending launch request.");
- if (foreground_v4_app.valid()) {
+ if (foreground_v4_app) {
LOG4CXX_DEBUG(logger_, "Sending request to foreground application.");
MessageHelper::SendLaunchApp(foreground_v4_app->app_id(),
app_to_activate->SchemaUrl(),