]> granicus.if.org Git - re2c/commitdiff
Reclaced class member with a local variable.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 10 Mar 2015 18:53:31 +0000 (18:53 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 10 Mar 2015 18:53:31 +0000 (18:53 +0000)
re2c/code.cc
re2c/dfa.h

index c2f6ad9ab56959f08d933e0b895bd80fcb7d4d9d..9d7fd2a3a349b213158c68e63ce713a303fe8cbb 100644 (file)
@@ -1035,10 +1035,10 @@ void Go::genGoto(OutputFile & o, uint ind, const State *from, const State *next,
        }
 */
        uint dSpans = 0;
+       std::set<uint> vTargets;
+       uint nBitmaps = 0;
        if (gFlag || (encoding.szCodeUnit() > 1))
        {
-               uint nBitmaps = 0;
-               std::set<uint> 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;
index 23259e61f654454188248b6f499801a092be9c94..1c6e91de269bd73aca3632be92c0c97661901006 100644 (file)
@@ -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: