From accca51d6a9e4e8384e3d131a2a459c7b86ad866 Mon Sep 17 00:00:00 2001 From: Lukasz Wysocki Date: Fri, 15 Jan 2016 11:11:29 +0100 Subject: [PATCH] Style and code fix Change-Id: I2579598545e3539944c78fcf0bc93f220eaf3512 --- src/wgt/step/step_wgt_backup_icons.cc | 3 ++- src/wgt/step/step_wgt_create_icons.cc | 5 +++-- src/wgt/step/step_wgt_recover_icons.cc | 2 +- src/wgt/step/step_wgt_recover_icons.h | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/wgt/step/step_wgt_backup_icons.cc b/src/wgt/step/step_wgt_backup_icons.cc index c1d63e0..5544182 100644 --- a/src/wgt/step/step_wgt_backup_icons.cc +++ b/src/wgt/step/step_wgt_backup_icons.cc @@ -5,6 +5,7 @@ #include "wgt/step/step_wgt_backup_icons.h" #include +#include namespace { const char kSharedRes[] = "shared/res"; @@ -16,7 +17,7 @@ namespace wgt { namespace backup { common_installer::Step::Status StepWgtBackupIcons::process() { - // TODO (l.wysocki): As a temporary solution this will move icons into two + // TODO(l.wysocki): As a temporary solution this will move icons into two // destinations respectively {HOME}/.applications/icons, // and {APP_ROOT}/shared/res, when some project will stop using old // location ({HOME}/.applications/icons) then it can be removed from here. diff --git a/src/wgt/step/step_wgt_create_icons.cc b/src/wgt/step/step_wgt_create_icons.cc index 1bd73eb..c38f4c7 100644 --- a/src/wgt/step/step_wgt_create_icons.cc +++ b/src/wgt/step/step_wgt_create_icons.cc @@ -5,6 +5,7 @@ #include "wgt/step/step_wgt_create_icons.h" #include +#include #include "common/utils/glist_range.h" @@ -19,7 +20,7 @@ namespace wgt { namespace filesystem { common_installer::Step::Status StepWgtCreateIcons::process() { - // TODO (l.wysocki): As a temporary solution this will copy icons into two + // TODO(l.wysocki): As a temporary solution this will copy icons into two // destinations respectively {HOME}/.applications/icons, // and {APP_ROOT}/shared/res, when some project will stop using old // location ({HOME}/.applications/icons) then it can be removed from here. @@ -35,7 +36,7 @@ common_installer::Step::Status StepWgtCreateIcons::process() { icon_x* icon = reinterpret_cast(app->icon->data); bf::path icon_path = StepCreateIcons::GetIconRoot() / icon->text; if (icon->text) - free((void *)icon->text); + free(const_cast(icon->text)); icon->text = strdup(icon_path.c_str()); } } diff --git a/src/wgt/step/step_wgt_recover_icons.cc b/src/wgt/step/step_wgt_recover_icons.cc index 0149b78..995e609 100644 --- a/src/wgt/step/step_wgt_recover_icons.cc +++ b/src/wgt/step/step_wgt_recover_icons.cc @@ -16,7 +16,7 @@ namespace wgt { namespace filesystem { std::vector StepWgtRecoverIcons::GetIconsPaths() { - // TODO (l.wysocki): As a temporary solution this will move icons into two + // TODO(l.wysocki): As a temporary solution this will move icons into two // destinations respectively {HOME}/.applications/icons, // and {APP_ROOT}/shared/res, when some project will stop using old // location ({HOME}/.applications/icons) then it can be removed from here. diff --git a/src/wgt/step/step_wgt_recover_icons.h b/src/wgt/step/step_wgt_recover_icons.h index cf63981..5f88113 100644 --- a/src/wgt/step/step_wgt_recover_icons.h +++ b/src/wgt/step/step_wgt_recover_icons.h @@ -6,6 +6,7 @@ #define WGT_STEP_STEP_WGT_RECOVER_ICONS_H_ #include +#include namespace wgt { namespace filesystem { -- 2.7.4