diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-11-04 12:01:08 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-11-04 17:32:12 +0000 |
commit | 59dbf1786f22ec4ac88d8f9d38cac5cfb82acaea (patch) | |
tree | e0e73b31a47cb5f9eb497945727d54a7e55ff445 /src/3rdparty/harfbuzz-ng/src/hb-private.hh | |
parent | a926f675be220ca6020039ac3640991b63a0fae7 (diff) |
QLocale: Return overflowing numbers from asciiToDouble()
The behavior from before libdouble-conversion is that in case of an
overflow the OK flag is set to false, but the returned number is still
infinity, rather than 0. Also, the number of processed characters is
always set to the number of characters actually processed, unless
garbage is found.
There is an important distinction between an overflow and garbage. The
client code may accept overflows and infinity may be a valid result.
Garbage is most certainly not acceptable. Having an infinity/false result
in addition to 0/false allows the client code to distinguish those.
One application where this is useful is parsing JavaScript.
Change-Id: I4b8581568144b44fca3353c4bd9685c702762af9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-private.hh')
0 files changed, 0 insertions, 0 deletions