mirror of
https://github.com/boostorg/spirit.git
synced 2026-01-19 04:42:11 +00:00
ts_real_policies: Fixed small numbers parsing
Numbers in range (-1000.0, 1000.0) has only one segment (no thousands delimiter), and are parsed in `if` statement expression.
This commit is contained in:
@@ -168,7 +168,6 @@ struct ts_real_policies : boost::spirit::qi::ureal_policies<T>
|
||||
T result = 0;
|
||||
if (parse(first, last, uint3, result))
|
||||
{
|
||||
bool hit = false;
|
||||
T n;
|
||||
Iterator save = first;
|
||||
|
||||
@@ -176,13 +175,11 @@ struct ts_real_policies : boost::spirit::qi::ureal_policies<T>
|
||||
{
|
||||
result = result * 1000 + n;
|
||||
save = first;
|
||||
hit = true;
|
||||
}
|
||||
|
||||
first = save;
|
||||
if (hit)
|
||||
attr = result;
|
||||
return hit;
|
||||
attr = result;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user