From: Ulya Fokanova Date: Mon, 13 Jan 2014 10:13:14 +0000 (+0300) Subject: Changed 'unsigned int' to 'int' (now comparison '< 0' makes sense). X-Git-Tag: 0.13.7.1~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d933b05774234358f5e0f051b2c76ff72673c85;p=re2c Changed 'unsigned int' to 'int' (now comparison '< 0' makes sense). --- diff --git a/re2c/bootstrap/parser.cc b/re2c/bootstrap/parser.cc index 907a63a7..39180cb1 100644 --- a/re2c/bootstrap/parser.cc +++ b/re2c/bootstrap/parser.cc @@ -168,7 +168,7 @@ void context_rule(CondList *clist, RegExp *expr, RegExp *look, Str *newcond, Tok { size_t nIndex = specMap.size() + 1; // 0 is reserved for "0"-spec assert( nIndex < 1u << 31); - specMap[*it] = std::make_pair(unsigned( nIndex), rule); + specMap[*it] = std::make_pair(int(nIndex), rule); } } diff --git a/re2c/parser.y b/re2c/parser.y index 459b67f9..1be1886b 100644 --- a/re2c/parser.y +++ b/re2c/parser.y @@ -98,7 +98,7 @@ void context_rule(CondList *clist, RegExp *expr, RegExp *look, Str *newcond, Tok { size_t nIndex = specMap.size() + 1; // 0 is reserved for "0"-spec assert( nIndex < 1u << 31); - specMap[*it] = std::make_pair(unsigned( nIndex), rule); + specMap[*it] = std::make_pair(int(nIndex), rule); } } diff --git a/re2c/re.h b/re2c/re.h index 9f8b6fd9..870b2f12 100644 --- a/re2c/re.h +++ b/re2c/re.h @@ -530,7 +530,7 @@ private: }; typedef std::set CondList; -typedef std::pair NRegExp; +typedef std::pair NRegExp; typedef std::map RegExpMap; typedef std::vector RegExpIndices; typedef std::list RuleOpList;