From 0d933b05774234358f5e0f051b2c76ff72673c85 Mon Sep 17 00:00:00 2001 From: Ulya Fokanova Date: Mon, 13 Jan 2014 13:13:14 +0300 Subject: [PATCH] Changed 'unsigned int' to 'int' (now comparison '< 0' makes sense). --- re2c/bootstrap/parser.cc | 2 +- re2c/parser.y | 2 +- re2c/re.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.40.0