[Release] wrt-installer_0.1.9
[platform/framework/web/wrt-installer.git] / src / misc / widget_location.cpp
index 4bd69f1..d6fff67 100644 (file)
 
 #include <widget_install/task_commons.h>
 
-WidgetLocation::DirectoryDeletor::DirectoryDeletor()
-{
-    m_dirpath = Jobs::WidgetInstall::createTempPath();
-}
+WidgetLocation::DirectoryDeletor::DirectoryDeletor() :
+    m_dirpath(Jobs::WidgetInstall::createTempPath())
+{}
 
-WidgetLocation::DirectoryDeletor::DirectoryDeletor(std::string tempPath)
-{
-    m_dirpath = tempPath;
-}
+WidgetLocation::DirectoryDeletor::DirectoryDeletor(std::string tempPath) :
+        m_dirpath(tempPath)
+{}
 
 WidgetLocation::DirectoryDeletor::~DirectoryDeletor()
 {
@@ -177,7 +175,7 @@ std::string WidgetLocation::getConfigurationDir() const
 {
     if (m_type == WrtDB::PKG_TYPE_HOSTED_WEB_APP) {
         std::string path = ".";
-        int index = m_widgetSource.find_last_of("\\/");
+        std::size_t index = m_widgetSource.find_last_of("\\/");
         if (index != std::string::npos) {
             path = m_widgetSource.substr(0, index);
         }