Skip to content

Commit

Permalink
Merge pull request #140 from Lastique/patch-1
Browse files Browse the repository at this point in the history
Fix signed/unsigned mismatch warning on gcc.
  • Loading branch information
djowel committed Jul 27, 2015
2 parents 86bdb53 + eb1a197 commit 5bc397c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail
if (!Accumulate)
{
// skip leading zeros
while (it != last && *it == '0' && leading_zeros < MaxDigits)
while (it != last && *it == '0' && (MaxDigits < 0 || leading_zeros < static_cast< std::size_t >(MaxDigits)))
{
++it;
++leading_zeros;
Expand Down
2 changes: 1 addition & 1 deletion include/boost/spirit/home/qi/numeric/detail/real_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace boost { namespace spirit { namespace traits
{
if (exp >= 0)
{
std::size_t max_exp = std::numeric_limits<T>::max_exponent10;
int max_exp = std::numeric_limits<T>::max_exponent10;

// return false if exp exceeds the max_exp
// do this check only for primitive types!
Expand Down

0 comments on commit 5bc397c

Please sign in to comment.