[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 739a796 3/4: Replace boost scoped_ptr with st
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 739a796 3/4: Replace boost scoped_ptr with std unique_ptr |
Date: |
Mon, 23 Jan 2017 12:42:15 +0000 (UTC) |
branch: master
commit 739a7963d1e9076fd5bb1d39cecaa9fa553ee5b7
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Replace boost scoped_ptr with std unique_ptr
---
docmanager_ex.hpp | 8 ++++----
file_command_wx.cpp | 5 +++--
gpt_input.hpp | 4 ++--
group_quote_pdf_gen_wx.cpp | 4 ++--
ihs_irc7702.hpp | 5 ++---
input.hpp | 4 ++--
mec_input.hpp | 4 ++--
xml_lmi.hpp | 11 +++++------
8 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/docmanager_ex.hpp b/docmanager_ex.hpp
index a8e47ef..2efac5a 100644
--- a/docmanager_ex.hpp
+++ b/docmanager_ex.hpp
@@ -26,10 +26,10 @@
#include "uncopyable_lmi.hpp"
-#include <boost/scoped_ptr.hpp>
-
#include <wx/docview.h>
+#include <memory> // std::unique_ptr
+
class WXDLLIMPEXP_FWD_CORE wxMenuBar;
class WXDLLIMPEXP_FWD_CORE wxPageSetupDialogData;
class WXDLLIMPEXP_FWD_CORE wxPrintData;
@@ -70,8 +70,8 @@ class DocManagerEx
,bool sort
) override;
- boost::scoped_ptr<wxPrintData> const print_data_;
- boost::scoped_ptr<wxPageSetupDialogData> const page_setup_data_;
+ std::unique_ptr<wxPrintData> const print_data_;
+ std::unique_ptr<wxPageSetupDialogData> const page_setup_data_;
DECLARE_DYNAMIC_CLASS(DocManagerEx)
DECLARE_EVENT_TABLE()
diff --git a/file_command_wx.cpp b/file_command_wx.cpp
index d7398b8..83a3f3c 100644
--- a/file_command_wx.cpp
+++ b/file_command_wx.cpp
@@ -28,11 +28,12 @@
#include <boost/filesystem/convenience.hpp>
#include <boost/filesystem/path.hpp>
-#include <boost/scoped_ptr.hpp>
#include <wx/mimetype.h>
#include <wx/utils.h> // wxExecute()
+#include <memory> // std::unique_ptr
+
LMI_FORCE_LINKING_IN_SITU(file_command_wx)
// Implementing this function in a GUI module means the wx facility
@@ -48,7 +49,7 @@ void concrete_file_command
fs::path path(file);
std::string extension = fs::extension(path);
- boost::scoped_ptr<wxFileType> const ft
+ std::unique_ptr<wxFileType> const ft
(wxTheMimeTypesManager->GetFileTypeFromExtension(extension)
);
diff --git a/gpt_input.hpp b/gpt_input.hpp
index 8a84c1c..172f9c9 100644
--- a/gpt_input.hpp
+++ b/gpt_input.hpp
@@ -42,8 +42,8 @@
class product_database;
#include <boost/operators.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory> // std::unique_ptr
#include <string>
#include <vector>
@@ -140,7 +140,7 @@ class LMI_SO gpt_input
std::string RealizePaymentHistory();
std::string RealizeBenefitHistory();
- boost::scoped_ptr<product_database> database_;
+ std::unique_ptr<product_database> database_;
// Database axes are independent variables; they're "cached" along
// with the database, which is reset when any of them changes.
diff --git a/group_quote_pdf_gen_wx.cpp b/group_quote_pdf_gen_wx.cpp
index 515ab72..340bf6d 100644
--- a/group_quote_pdf_gen_wx.cpp
+++ b/group_quote_pdf_gen_wx.cpp
@@ -42,7 +42,6 @@
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
-#include <boost/scoped_ptr.hpp>
#include <wx/datetime.h>
#include <wx/html/htmlcell.h>
@@ -52,6 +51,7 @@
#include <cstring> // std::strstr()
#include <limits>
+#include <memory> // std::unique_ptr
#include <stdexcept>
#include <utility> // std::pair
#include <vector>
@@ -393,7 +393,7 @@ int output_html
,enum_output_mode output_mode = e_output_normal
)
{
- boost::scoped_ptr<wxHtmlContainerCell> const cell
+ std::unique_ptr<wxHtmlContainerCell> const cell
(static_cast<wxHtmlContainerCell*>(html_parser.Parse(html))
);
LMI_ASSERT(cell);
diff --git a/ihs_irc7702.hpp b/ihs_irc7702.hpp
index e068f21..0e3a7e6 100644
--- a/ihs_irc7702.hpp
+++ b/ihs_irc7702.hpp
@@ -29,8 +29,7 @@
#include "round_to.hpp"
#include "uncopyable_lmi.hpp"
-#include <boost/scoped_ptr.hpp>
-
+#include <memory> // std::unique_ptr
#include <vector>
class ULCommFns;
@@ -231,7 +230,7 @@ class Irc7702
// doesn't matter anymore. TAXATION !! Don't do that then.
//
// TODO ?? TAXATION !! Consider using std::vector instead of array members.
- boost::scoped_ptr<ULCommFns> CommFns [NumIOBases];
+ std::unique_ptr<ULCommFns> CommFns [NumIOBases];
// After the Init- functions have executed, we can delete the
// rather sizeable ULCommFns objects, as long as we keep the
// endowment-year value of D for each basis. TAXATION !! But
diff --git a/input.hpp b/input.hpp
index a7e8e09..6868984 100644
--- a/input.hpp
+++ b/input.hpp
@@ -42,9 +42,9 @@
class product_database;
#include <boost/operators.hpp>
-#include <boost/scoped_ptr.hpp>
#include <map>
+#include <memory> // std::unique_ptr
#include <string>
#include <vector>
@@ -219,7 +219,7 @@ class LMI_SO Input
void make_term_rider_consistent(bool aggressively = true);
- boost::scoped_ptr<product_database> database_;
+ std::unique_ptr<product_database> database_;
// Database axes are independent variables; they're "cached" along
// with the database, which is reset when any of them changes.
diff --git a/mec_input.hpp b/mec_input.hpp
index 5aef5b6..3557dc3 100644
--- a/mec_input.hpp
+++ b/mec_input.hpp
@@ -42,8 +42,8 @@
class product_database;
#include <boost/operators.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory> // std::unique_ptr
#include <string>
#include <vector>
@@ -129,7 +129,7 @@ class LMI_SO mec_input
std::string RealizePaymentHistory();
std::string RealizeBenefitHistory();
- boost::scoped_ptr<product_database> database_;
+ std::unique_ptr<product_database> database_;
// Database axes are independent variables; they're "cached" along
// with the database, which is reset when any of them changes.
diff --git a/xml_lmi.hpp b/xml_lmi.hpp
index c010321..f5a2f4e 100644
--- a/xml_lmi.hpp
+++ b/xml_lmi.hpp
@@ -27,12 +27,11 @@
#include "uncopyable_lmi.hpp"
#include "xml_lmi_fwd.hpp"
-#include <boost/scoped_ptr.hpp>
-
#include <xmlwrapp/node.h> // xml::element
#include <cstddef> // std::size_t
#include <iosfwd>
+#include <memory> // std::unique_ptr
#include <string>
/// Interface to xmlwrapp.
@@ -54,8 +53,8 @@ namespace xml_lmi
xml::element const& root_node(std::string const& expected_name) const;
private:
- std::string error_context_;
- boost::scoped_ptr<DomParser> parser_;
+ std::string error_context_;
+ std::unique_ptr<DomParser> parser_;
};
class xml_document
@@ -74,8 +73,8 @@ namespace xml_lmi
void add_comment(std::string const&);
private:
- std::string error_context_;
- boost::scoped_ptr<Document> const document_;
+ std::string error_context_;
+ std::unique_ptr<Document> const document_;
};
xml::node::const_iterator retrieve_element