parser: fix compilation failure on 32 bit systems

Merge from trunk revision 2308.

std::max in C++ requires that both arguments be the same type. The
previous fix added std::max comparisons between unsigned long numeric
constants and size_t, this fix casts the numeric constants to size_t.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Steve Beattie 2014-01-10 11:08:38 -08:00
parent ac7ab1c089
commit 9040d46cc4

View file

@ -92,9 +92,9 @@ CHFA::CHFA(DFA &dfa, map<uchar, uchar> &eq, dfaflags_t flags): eq(eq)
default_base.push_back(make_pair(dfa.nonmatching, 0));
num.insert(make_pair(dfa.nonmatching, num.size()));
accept.resize(max(dfa.states.size(), 2ul));
accept2.resize(max(dfa.states.size(), 2ul));
next_check.resize(max(optimal, 256ul));
accept.resize(max(dfa.states.size(), (size_t) 2));
accept2.resize(max(dfa.states.size(), (size_t) 2));
next_check.resize(max(optimal, (size_t) 256));
free_list.resize(next_check.size());
accept[0] = 0;