diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-07 14:19:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-07 14:55:55 +0200 |
commit | b2fb84499e1f75735e8fd90bc2eece3fed9af5f6 (patch) | |
tree | 186f3a6947b4d5feffe1326f66021102fac88c83 /idl | |
parent | c89f73a6033b28484f5e10054b542fa69a9fe475 (diff) |
loplugin:write only fields
Change-Id: Ia0fb487c5590e096659b81f76c4dc543e184c59c
Diffstat (limited to 'idl')
-rw-r--r-- | idl/inc/lex.hxx | 5 | ||||
-rw-r--r-- | idl/source/cmptools/lex.cxx | 13 |
2 files changed, 8 insertions, 10 deletions
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index 7a715206211e..1891e3962006 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -110,7 +110,6 @@ class SvTokenStream sal_uLong nMaxPos; SvFileStream * pInStream; - SvStream & rInStream; OUString aFileName; std::vector<std::unique_ptr<SvToken> > aTokList; std::vector<std::unique_ptr<SvToken> >::iterator pCurToken; @@ -130,7 +129,7 @@ class SvTokenStream void FillTokenList(); sal_uLong GetNumber(); bool MakeToken( SvToken & ); - bool IsEof() const { return rInStream.IsEof(); } + bool IsEof() const { return pInStream->IsEof(); } void SetMax() { sal_uLong n = Tell(); @@ -153,7 +152,7 @@ public: ~SvTokenStream(); const OUString & GetFileName() const { return aFileName; } - SvStream & GetStream() { return rInStream; } + SvStream & GetStream() { return *pInStream; } SvToken& GetToken_PrevAll() { diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx index e243302fa565..cb7b2c456d24 100644 --- a/idl/source/cmptools/lex.cxx +++ b/idl/source/cmptools/lex.cxx @@ -85,7 +85,6 @@ void SvTokenStream::InitCtor() SvTokenStream::SvTokenStream( const OUString & rFileName ) : pInStream( new SvFileStream( rFileName, STREAM_STD_READ | StreamMode::NOCREATE ) ) - , rInStream( *pInStream ) , aFileName( rFileName ) { InitCtor(); @@ -133,7 +132,7 @@ int SvTokenStream::GetNextChar() int nChar; while (aBufStr.getLength() <= nBufPos) { - if (rInStream.ReadLine(aBufStr)) + if (pInStream->ReadLine(aBufStr)) { nLine++; nColumn = 0; @@ -203,7 +202,7 @@ bool SvTokenStream::MakeToken( SvToken & rToken ) nColumn += c == '\t' ? nTabSize : 1; } } - while( 0 == c && !IsEof() && ( SVSTREAM_OK == rInStream.GetError() ) ); + while( 0 == c && !IsEof() && ( SVSTREAM_OK == pInStream->GetError() ) ); sal_uLong nLastLine = nLine; sal_uLong nLastColumn = nColumn; @@ -240,8 +239,8 @@ bool SvTokenStream::MakeToken( SvToken & rToken ) } c = GetFastNextChar(); } - while( '/' != c && !IsEof() && ( SVSTREAM_OK == rInStream.GetError() ) ); - if( IsEof() || ( SVSTREAM_OK != rInStream.GetError() ) ) + while( '/' != c && !IsEof() && ( SVSTREAM_OK == pInStream->GetError() ) ); + if( IsEof() || ( SVSTREAM_OK != pInStream->GetError() ) ) return false; c = GetNextChar(); rToken.nType = SVTOKENTYPE::Comment; @@ -276,7 +275,7 @@ bool SvTokenStream::MakeToken( SvToken & rToken ) else aStr.append(static_cast<char>(c)); } - if( IsEof() || ( SVSTREAM_OK != rInStream.GetError() ) ) + if( IsEof() || ( SVSTREAM_OK != pInStream->GetError() ) ) return false; rToken.nType = SVTOKENTYPE::String; rToken.aString = aStr.makeStringAndClear(); @@ -330,7 +329,7 @@ bool SvTokenStream::MakeToken( SvToken & rToken ) } rToken.SetLine( nLastLine ); rToken.SetColumn( nLastColumn ); - return rInStream.GetError() == SVSTREAM_OK; + return pInStream->GetError() == SVSTREAM_OK; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |