From dd94f58d2e9a1ee9b0a30d5f80b3bbf9a6fc6271 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Tue, 10 Mar 2015 18:53:31 +0000 Subject: [PATCH] Reclaced class member with a local variable. --- re2c/code.cc | 8 ++++---- re2c/dfa.h | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/re2c/code.cc b/re2c/code.cc index c2f6ad9a..9d7fd2a3 100644 --- a/re2c/code.cc +++ b/re2c/code.cc @@ -1035,10 +1035,10 @@ void Go::genGoto(OutputFile & o, uint ind, const State *from, const State *next, } */ uint dSpans = 0; + std::set vTargets; + uint nBitmaps = 0; if (gFlag || (encoding.szCodeUnit() > 1)) { - uint nBitmaps = 0; - std::set vTargets; wSpans = 0; for (uint i = 0; i < nSpans; ++i) { @@ -1071,10 +1071,10 @@ void Go::genGoto(OutputFile & o, uint ind, const State *from, const State *next, } } } - lTargets = vTargets.size() >> nBitmaps; } - if (gFlag && (lTargets >= cGotoThreshold || dSpans >= cGotoThreshold)) + const uint lTargets = vTargets.size() >> nBitmaps; + if (gFlag && (std::max (lTargets, dSpans) >= cGotoThreshold)) { genCpGoto(o, ind, from, next, readCh); return; diff --git a/re2c/dfa.h b/re2c/dfa.h index 23259e61..1c6e91de 100644 --- a/re2c/dfa.h +++ b/re2c/dfa.h @@ -169,7 +169,6 @@ public: Go() : nSpans(0) , wSpans(~0u) - , lTargets(~0u) , span(NULL) { } @@ -177,7 +176,6 @@ public: public: uint nSpans; // number of spans uint wSpans; // number of spans in wide mode - uint lTargets; Span *span; public: -- 2.40.0