From: Ulya Trofimovich Date: Tue, 10 Mar 2015 18:53:31 +0000 (+0000) Subject: Reclaced class member with a local variable. X-Git-Tag: 0.15~357 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd94f58d2e9a1ee9b0a30d5f80b3bbf9a6fc6271;p=re2c Reclaced class member with a local variable. --- 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: