Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / feature_validator.cc
index 3ddc3aa..5c7b3be 100644 (file)
@@ -4,10 +4,11 @@
 
 #include "common/feature_validator.h"
 
-#include <boost/scope_exit.hpp>
-
 #include <system_info.h>
 
+#include <memory>
+#include <string>
+
 namespace common_installer {
 
 FeatureValidator::FeatureValidator(
@@ -77,9 +78,7 @@ bool FeatureValidator::ValidateInteger(
 bool FeatureValidator::ValidateString(
     const std::string& feature, std::string* error) {
   char* text = nullptr;
-  BOOST_SCOPE_EXIT_ALL(text) {
-    free(text);
-  };
+  std::unique_ptr<char, decltype(&std::free)> text_deleter(text, std::free);
   int ret = system_info_get_platform_string(feature.c_str(), &text);
   if (ret != SYSTEM_INFO_ERROR_NONE) {
     *error = std::string("Failed to call system_info_get_platform_string()") +