From: Maksym Mamontov <madf@madf.info>
Date: Mon, 27 Jan 2020 20:58:14 +0000 (+0200)
Subject: Replace boost::scoped_ptr with std::unique_ptr.
X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/e483fbc3e51aca90ff4abc5347862173366c40ef?hp=-c

Replace boost::scoped_ptr with std::unique_ptr.
---

e483fbc3e51aca90ff4abc5347862173366c40ef
diff --git a/libs/json/include/stg/json_generator.h b/libs/json/include/stg/json_generator.h
index 831b0e05..4e8c870c 100644
--- a/libs/json/include/stg/json_generator.h
+++ b/libs/json/include/stg/json_generator.h
@@ -26,8 +26,6 @@
 #include <vector>
 #include <utility>
 
-#include <boost/scoped_ptr.hpp>
-
 struct yajl_gen_t;
 
 namespace STG
diff --git a/libs/json/include/stg/json_parser.h b/libs/json/include/stg/json_parser.h
index a6142579..5884039d 100644
--- a/libs/json/include/stg/json_parser.h
+++ b/libs/json/include/stg/json_parser.h
@@ -25,8 +25,7 @@
 
 #include <string>
 #include <map>
-
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 namespace STG
 {
@@ -59,7 +58,7 @@ class Parser
 
     private:
         class Impl;
-        boost::scoped_ptr<Impl> m_impl;
+        std::unique_ptr<Impl> m_impl;
 };
 
 template <typename T>
diff --git a/rlm_stg/conn.h b/rlm_stg/conn.h
index 6b6fd261..92fbff82 100644
--- a/rlm_stg/conn.h
+++ b/rlm_stg/conn.h
@@ -23,9 +23,8 @@
 
 #include "types.h"
 
-#include <boost/scoped_ptr.hpp>
-
 #include <string>
+#include <memory>
 #include <stdexcept>
 #include <cstdint>
 
@@ -53,7 +52,7 @@ class Conn
 
     private:
         class Impl;
-        boost::scoped_ptr<Impl> m_impl;
+        std::unique_ptr<Impl> m_impl;
 };
 
 }
diff --git a/rlm_stg/stg_client.cpp b/rlm_stg/stg_client.cpp
index e34c50cd..21727225 100644
--- a/rlm_stg/stg_client.cpp
+++ b/rlm_stg/stg_client.cpp
@@ -51,7 +51,7 @@ class Client::Impl
 
     private:
         std::string m_address;
-        boost::scoped_ptr<Conn> m_conn;
+        std::unique_ptr<Conn> m_conn;
 
         pthread_mutex_t m_mutex;
         pthread_cond_t m_cond;
diff --git a/rlm_stg/stg_client.h b/rlm_stg/stg_client.h
index 4d4c582b..249b8871 100644
--- a/rlm_stg/stg_client.h
+++ b/rlm_stg/stg_client.h
@@ -23,9 +23,8 @@
 
 #include "types.h"
 
-#include <boost/scoped_ptr.hpp>
-
 #include <string>
+#include <memory>
 #include <cstdint>
 
 namespace STG
@@ -48,7 +47,7 @@ public:
 
 private:
     class Impl;
-    boost::scoped_ptr<Impl> m_impl;
+    std::unique_ptr<Impl> m_impl;
 };
 
 } // namespace RLM
diff --git a/stargazer/plugins/other/radius/conn.h b/stargazer/plugins/other/radius/conn.h
index 96e74300..7b633d71 100644
--- a/stargazer/plugins/other/radius/conn.h
+++ b/stargazer/plugins/other/radius/conn.h
@@ -21,9 +21,8 @@
 #ifndef __STG_SGCONFIG_CONN_H__
 #define __STG_SGCONFIG_CONN_H__
 
-#include <boost/scoped_ptr.hpp>
-
 #include <string>
+#include <memory>
 
 class USER;
 class USERS;
@@ -50,7 +49,7 @@ class Conn
 
     private:
         class Impl;
-        boost::scoped_ptr<Impl> m_impl;
+        std::unique_ptr<Impl> m_impl;
 };
 
 }