diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-11-09 15:25:29 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-11-09 17:12:21 +0100 |
commit | 9ed9f30f2202cc7d57b1dbe68a37cc6fbbd2866a (patch) | |
tree | f0c1642a1e14e77ad77b50c65054e9c2daf2c8f0 /starmath/inc | |
parent | e126cf6c66635c34b61952262d5aa6d745c29198 (diff) |
starmath: replace boost::ptr_deque with std::deque<std::unique_ptr>
Change-Id: I1d2671a0b355bd4dbb195d69af2c432c50df904e
Diffstat (limited to 'starmath/inc')
-rw-r--r-- | starmath/inc/node.hxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 3126f583e668..c7f71ba99554 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -20,16 +20,16 @@ #ifndef INCLUDED_STARMATH_INC_NODE_HXX #define INCLUDED_STARMATH_INC_NODE_HXX -#include <vector> -#include <ostream> - #include "types.hxx" #include "token.hxx" #include "error.hxx" #include "rect.hxx" #include "format.hxx" -#include <boost/ptr_container/ptr_deque.hpp> + #include <memory> +#include <vector> +#include <deque> +#include <ostream> #define ATTR_BOLD 0x0001 #define ATTR_ITALIC 0x0002 @@ -61,15 +61,16 @@ class SmNode; class SmStructureNode; typedef std::shared_ptr<SmNode> SmNodePointer; -typedef boost::ptr_deque<SmNode> SmNodeStack; +typedef std::deque<std::unique_ptr<SmNode>> SmNodeStack; typedef std::vector< SmNode * > SmNodeArray; template < typename T > -T* popOrZero( boost::ptr_deque<T> & rStack ) +T* popOrZero(std::deque<std::unique_ptr<T>> & rStack) { if (rStack.empty()) - return 0; - auto pTmp = rStack.pop_front(); + return nullptr; + std::unique_ptr<T> pTmp(std::move(rStack.front())); + rStack.pop_front(); return pTmp.release(); } |