summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-21 19:13:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-23 08:16:18 +0200
commitd254f8a926d7d3ec4565d01f7a41ad3d9d7c9e87 (patch)
tree6f33b99f7344c3861972760428fb974073130d8d /basic
parent7c08c1af7116346f2dc0b669e231d82f4230a8c7 (diff)
loplugin:singlevalfields improve unaryoperator
when we see a unaryoperator, unless it's one of a small set, we can know (mostly) that the field will not be written. there is still a small risk of false+ with code taking references via conditional expressions. Change-Id: I96fa808067576a50e5eaf425338e225b4e0bdd4e Reviewed-on: https://gerrit.libreoffice.org/53263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/token.cxx4
-rw-r--r--basic/source/inc/token.hxx1
2 files changed, 1 insertions, 4 deletions
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index 60d10ab6a11b..4cb564d0b62e 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -212,7 +212,6 @@ SbiTokenizer::SbiTokenizer( const OUString& rSrc, StarBASIC* pb )
, nPCol2(0)
, bEof(false)
, bEos(true)
- , bKeywords(true)
, bAs(false)
, bErrorIsSymbol(true)
{
@@ -362,8 +361,7 @@ SbiToken SbiTokenizer::Next()
}
else
{
- if( eScanType != SbxVARIANT
- || ( !bKeywords && bSymbol ) )
+ if( eScanType != SbxVARIANT )
return eCurTok = SYMBOL;
// valid token?
short lb = 0;
diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx
index 3f265cefb83e..598d20c15e42 100644
--- a/basic/source/inc/token.hxx
+++ b/basic/source/inc/token.hxx
@@ -107,7 +107,6 @@ protected:
sal_uInt16 nPLine, nPCol1, nPCol2; // pushback location
bool bEof;
bool bEos;
- bool bKeywords; // true, if keywords are parsed
bool bAs; // last keyword was AS
bool bErrorIsSymbol; // Handle Error token as Symbol, not keyword
public: