diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-11 09:14:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-11 11:35:42 +0200 |
commit | 5d892a3378dfd5c452ba106b002c7cef9a77a861 (patch) | |
tree | 7c0456184484575f691edb4bdf99b8e880ac7f95 /idl/inc | |
parent | 1459f127711ba11e0ce044d9fb70d1941b5c3209 (diff) |
idl: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I19fb53e162f3af282cd8cf46b965bce9506731ec
Diffstat (limited to 'idl/inc')
-rw-r--r-- | idl/inc/lex.hxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index ffcb0c91ee30..d9a09182635a 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -20,11 +20,11 @@ #ifndef INCLUDED_IDL_INC_LEX_HXX #define INCLUDED_IDL_INC_LEX_HXX -#include <boost/ptr_container/ptr_vector.hpp> - #include <sal/types.h> #include <hash.hxx> #include <tools/stream.hxx> +#include <vector> +#include <memory> enum SVTOKEN_ENUM { SVTOKEN_EMPTY, SVTOKEN_COMMENT, SVTOKEN_INTEGER, SVTOKEN_STRING, @@ -132,8 +132,8 @@ class SvTokenStream SvFileStream * pInStream; SvStream & rInStream; OUString aFileName; - boost::ptr_vector<SvToken> aTokList; - boost::ptr_vector<SvToken>::iterator pCurToken; + std::vector<std::unique_ptr<SvToken> > aTokList; + std::vector<std::unique_ptr<SvToken> >::iterator pCurToken; OString aBufStr; @@ -178,25 +178,25 @@ public: SvToken* GetToken_PrevAll() { - boost::ptr_vector<SvToken>::iterator pRetToken = pCurToken; + std::vector<std::unique_ptr<SvToken> >::iterator pRetToken = pCurToken; // current iterator always valid if(pCurToken != aTokList.begin()) --pCurToken; - return &(*pRetToken); + return (*pRetToken).get(); } SvToken* GetToken_NextAll() { - boost::ptr_vector<SvToken>::iterator pRetToken = pCurToken++; + std::vector<std::unique_ptr<SvToken> >::iterator pRetToken = pCurToken++; if (pCurToken == aTokList.end()) pCurToken = pRetToken; SetMax(); - return &(*pRetToken); + return (*pRetToken).get(); } SvToken* GetToken_Next() @@ -205,12 +205,12 @@ public: return GetToken_NextAll(); } - SvToken& GetToken() const { return *pCurToken; } + SvToken& GetToken() const { return *(*pCurToken).get(); } bool Read( char cChar ) { - if( pCurToken->IsChar() - && cChar == pCurToken->GetChar() ) + if( (*pCurToken)->IsChar() + && cChar == (*pCurToken)->GetChar() ) { GetToken_Next(); return true; @@ -221,9 +221,9 @@ public: void ReadDelemiter() { - if( pCurToken->IsChar() - && (';' == pCurToken->GetChar() - || ',' == pCurToken->GetChar()) ) + if( (*pCurToken)->IsChar() + && (';' == (*pCurToken)->GetChar() + || ',' == (*pCurToken)->GetChar()) ) { GetToken_Next(); } |