]> granicus.if.org Git - re2c/commitdiff
Don't check range bounds in pretty-printing function.
authorUlya Trofimovich <skvadrik@gmail.com>
Fri, 26 Jun 2015 13:09:51 +0000 (14:09 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Fri, 26 Jun 2015 13:09:51 +0000 (14:09 +0100)
re2c/src/codegen/print.cc

index 09d0a1a8f6cb344d5f09ac9ebb8ac7f536c3e1e5..1c67fe4262306668a46ade9f7511dee548d9eead 100644 (file)
@@ -160,13 +160,7 @@ void prtChOrHexForSpan(std::ostream& o, uint32_t c)
 
 void printSpan(std::ostream& o, uint32_t lb, uint32_t ub)
 {
-       if (lb > ub)
-       {
-               o << "*";
-       }
-
        o << "[";
-
        if ((ub - lb) == 1)
        {
                prtChOrHexForSpan(o, lb);
@@ -177,7 +171,6 @@ void printSpan(std::ostream& o, uint32_t lb, uint32_t ub)
                o << "-";
                prtChOrHexForSpan(o, ub - 1);
        }
-
        o << "]";
 }