]> granicus.if.org Git - re2c/commitdiff
- Simplify fillIndex handling in need()
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 8 Apr 2006 19:21:53 +0000 (19:21 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 8 Apr 2006 19:21:53 +0000 (19:21 +0000)
code.cc

diff --git a/code.cc b/code.cc
index 53820f82969d77b5af55bafc41925a137b6d6152..82d541bed7b39fa8d69edadb5c870c28bec1dd8b 100644 (file)
--- a/code.cc
+++ b/code.cc
@@ -293,18 +293,14 @@ void genIf(std::ostream &o, uint ind, const char *cmp, uint v, bool &readCh)
 
 static void need(std::ostream &o, uint ind, uint n, bool & readCh)
 {
-       uint fillIndex;
+       uint fillIndex = vFillIndexes;
        bool hasFillIndex = (0<=vFillIndexes);
 
        if (hasFillIndex)
        {
-               fillIndex = vFillIndexes++;
+               vFillIndexes++;
                o << indent(ind) << "YYSETSTATE(" << fillIndex << ");\n";
        }
-       else
-       {
-               fillIndex = ~0;
-       }
 
        if (n == 1)
        {