From 2c11437f906899dd33f350b502bf6dbdb9254d3c Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Fri, 28 Aug 2015 23:10:33 +0100 Subject: [PATCH] Narrowed scope of local variables. --- re2c/src/ir/dfa/dfa.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/re2c/src/ir/dfa/dfa.cc b/re2c/src/ir/dfa/dfa.cc index 00b4db30..eeccf157 100644 --- a/re2c/src/ir/dfa/dfa.cc +++ b/re2c/src/ir/dfa/dfa.cc @@ -60,12 +60,11 @@ DFA::DFA(Ins *ins, uint32_t ni, uint32_t lb, uint32_t ub, const Char *rep) State *s = toDo; toDo = s->link; - Ins **cP, **iP, *i; uint32_t nGoTos = 0; s->rule = NULL; - for (iP = s->kernel; (i = *iP); ++iP) + for (Ins ** iP = s->kernel, * i; (i = *iP); ++iP) { if (i->i.tag == CHAR) { @@ -91,9 +90,10 @@ DFA::DFA(Ins *ins, uint32_t ni, uint32_t lb, uint32_t ub, const Char *rep) for (uint32_t j = 0; j < nGoTos; ++j) { GoTo *go = &goTo[goTo[j].ch - lb]; - i = (Ins*) go->to; + Ins * i = (Ins*) go->to; - for (cP = work; i; i = (Ins*) i->c.link) + Ins ** cP = work; + for (; i; i = (Ins*) i->c.link) cP = closure(cP, i + i->c.bump); go->to = findState(work, cP); -- 2.40.0