diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-11 10:37:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-11 14:47:01 +0200 |
commit | 09d58f7be8802c7e3f60ced1b428195b4d6bb7fa (patch) | |
tree | dab8f13a6b49f54c1d16c97592d96c44b57f91f6 /idl/inc | |
parent | 6e8be4c99e00d75bfb0d358f64071495ec6b21e3 (diff) |
GetToken never returns null, so use a reference
Change-Id: I0164e546b0ee0b40acc7b9253d3c0ecded97280c
Diffstat (limited to 'idl/inc')
-rw-r--r-- | idl/inc/lex.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index 14b91cd893e6..e2e5bc374a87 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -156,7 +156,7 @@ public: const OUString & GetFileName() const { return aFileName; } SvStream & GetStream() { return rInStream; } - SvToken* GetToken_PrevAll() + SvToken& GetToken_PrevAll() { std::vector<std::unique_ptr<SvToken> >::iterator pRetToken = pCurToken; @@ -164,10 +164,10 @@ public: if(pCurToken != aTokList.begin()) --pCurToken; - return (*pRetToken).get(); + return *(*pRetToken).get(); } - SvToken* GetToken_NextAll() + SvToken& GetToken_NextAll() { std::vector<std::unique_ptr<SvToken> >::iterator pRetToken = pCurToken++; @@ -176,10 +176,10 @@ public: SetMax(); - return (*pRetToken).get(); + return *(*pRetToken).get(); } - SvToken* GetToken_Next() + SvToken& GetToken_Next() { // comments get removed initially return GetToken_NextAll(); |