diff options
author | David Tardon <dtardon@redhat.com> | 2017-04-15 16:20:36 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2017-04-15 16:24:21 +0200 |
commit | 0d97470dfdd0aa64ff81d584558ee1f282a0bc27 (patch) | |
tree | d4ead042311473f79ef623663934ad5d86987818 | |
parent | 9cf66ba75ce809493be97f542525e75ac57f3a2d (diff) |
boost::shared_ptr -> std::shared_ptr
Change-Id: I910492f8c884e350a5301d8c7ccd403f7217c176
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/lib/ABWContentCollector.cpp | 6 | ||||
-rw-r--r-- | src/lib/ABWContentCollector.h | 7 | ||||
-rw-r--r-- | src/lib/ABWParser.cpp | 2 | ||||
-rw-r--r-- | src/lib/ABWXMLString.h | 4 | ||||
-rw-r--r-- | src/lib/AbiDocument.cpp | 6 |
6 files changed, 12 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 6c317d8..61c606b 100644 --- a/configure.ac +++ b/configure.ac @@ -263,10 +263,8 @@ AC_SUBST(ZLIB_LIBS) # ================== AC_CHECK_HEADERS( boost/algorithm/string.hpp \ - boost/make_shared.hpp \ boost/optional.hpp \ boost/scoped_ptr.hpp \ - boost/shared_ptr.hpp \ boost/spirit/include/classic.hpp, [], [AC_MSG_ERROR([Required boost headers not found.])], diff --git a/src/lib/ABWContentCollector.cpp b/src/lib/ABWContentCollector.cpp index 0c7d102..cd7c98b 100644 --- a/src/lib/ABWContentCollector.cpp +++ b/src/lib/ABWContentCollector.cpp @@ -9,9 +9,9 @@ #include <cassert> #include <locale> +#include <memory> #include <sstream> -#include <boost/make_shared.hpp> #include <boost/spirit/include/classic.hpp> #include <boost/algorithm/string.hpp> #include <boost/optional.hpp> @@ -1595,7 +1595,7 @@ void libabw::ABWContentCollector::openFoot(const char *id) m_outputElements.addOpenFootnote(propList); m_parsingStates.push(m_ps); - m_ps = boost::make_shared<ABWContentParsingState>(); + m_ps = std::make_shared<ABWContentParsingState>(); m_ps->m_isNote = true; } @@ -1628,7 +1628,7 @@ void libabw::ABWContentCollector::openEndnote(const char *id) m_outputElements.addOpenEndnote(propList); m_parsingStates.push(m_ps); - m_ps = boost::make_shared<ABWContentParsingState>(); + m_ps = std::make_shared<ABWContentParsingState>(); m_ps->m_isNote = true; } diff --git a/src/lib/ABWContentCollector.h b/src/lib/ABWContentCollector.h index 56704da..704f648 100644 --- a/src/lib/ABWContentCollector.h +++ b/src/lib/ABWContentCollector.h @@ -10,12 +10,11 @@ #ifndef __ABWCONTENTCOLLECTOR_H__ #define __ABWCONTENTCOLLECTOR_H__ +#include <memory> #include <vector> #include <stack> #include <set> -#include <boost/shared_ptr.hpp> - #include <librevenge/librevenge.h> #include "ABWOutputElements.h" #include "ABWCollector.h" @@ -208,9 +207,9 @@ private: void _fillParagraphProperties(librevenge::RVNGPropertyList &propList, bool isListElement); - boost::shared_ptr<ABWContentParsingState> m_ps; + std::shared_ptr<ABWContentParsingState> m_ps; librevenge::RVNGTextInterface *m_iface; - std::stack<boost::shared_ptr<ABWContentParsingState> > m_parsingStates; + std::stack<std::shared_ptr<ABWContentParsingState> > m_parsingStates; std::set<std::string> m_dontLoop; std::map<std::string, ABWStyle> m_textStyles; diff --git a/src/lib/ABWParser.cpp b/src/lib/ABWParser.cpp index 92b46de..19a091b 100644 --- a/src/lib/ABWParser.cpp +++ b/src/lib/ABWParser.cpp @@ -185,7 +185,7 @@ bool libabw::ABWParser::processXmlDocument(librevenge::RVNGInputStream *input) if (!input) return false; - boost::shared_ptr<xmlTextReader> reader(xmlReaderForStream(input), xmlFreeTextReader); + std::shared_ptr<xmlTextReader> reader(xmlReaderForStream(input), xmlFreeTextReader); if (!reader) return false; int ret = xmlTextReaderRead(reader.get()); diff --git a/src/lib/ABWXMLString.h b/src/lib/ABWXMLString.h index 893e9a3..ce679db 100644 --- a/src/lib/ABWXMLString.h +++ b/src/lib/ABWXMLString.h @@ -10,7 +10,7 @@ #ifndef __ABWXMLSTRING_H__ #define __ABWXMLSTRING_H__ -#include <boost/shared_ptr.hpp> +#include <memory> #include <libxml/xmlstring.h> @@ -28,7 +28,7 @@ public: operator const char *() const; private: - boost::shared_ptr<xmlChar> m_xml; + std::shared_ptr<xmlChar> m_xml; }; } diff --git a/src/lib/AbiDocument.cpp b/src/lib/AbiDocument.cpp index 43b6466..2228b70 100644 --- a/src/lib/AbiDocument.cpp +++ b/src/lib/AbiDocument.cpp @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <boost/shared_ptr.hpp> +#include <memory> #include <libabw/libabw.h> #include "ABWXMLHelper.h" @@ -50,11 +50,11 @@ ABWAPI bool libabw::AbiDocument::isFileFormatSupported(librevenge::RVNGInputStre ABW_DEBUG_MSG(("AbiDocument::isFileFormatSupported\n")); if (!input) return false; - boost::shared_ptr<xmlTextReader> reader; + std::unique_ptr<xmlTextReader, void (*)(xmlTextReaderPtr)> reader(nullptr, xmlFreeTextReader); input->seek(0, librevenge::RVNG_SEEK_SET); libabw::ABWZlibStream stream(input); stream.seek(0, librevenge::RVNG_SEEK_SET); - reader.reset(libabw::xmlReaderForStream(&stream), xmlFreeTextReader); + reader.reset(libabw::xmlReaderForStream(&stream)); if (!reader) return false; int ret = xmlTextReaderRead(reader.get()); |