diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-09-02 18:22:43 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-09-04 18:43:21 +0200 |
commit | 978f579a8c6a6cff3803cc62d4b09c974f476285 (patch) | |
tree | d457fe7d5fd2976d150c86676f5ea990c0b7845c /src/corelib/serialization/qtextstream.cpp | |
parent | effbf147a425bb7b656e23927e2f733597a5b299 (diff) |
Use quiet NaNs instead of signaling ones
I see no good reason why the NaN returned when reading "nan" as a
double should be a signaling one; a quiet one should be just fine.
[ChangeLog][QtCore][QLocale] The NaN obtained when reading "nan" as a
floating-point value is now quiet rather than signaling.
[ChangeLog][QtCore][QTextStream] The NaN obtained when reading "nan"
as a floating-point value is now quiet rather than signaling.
Change-Id: Ife477a30bfb813c611b13a33c38ea82f9e8a93eb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/serialization/qtextstream.cpp')
-rw-r--r-- | src/corelib/serialization/qtextstream.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/serialization/qtextstream.cpp b/src/corelib/serialization/qtextstream.cpp index a675c3cede..cf59cc54c7 100644 --- a/src/corelib/serialization/qtextstream.cpp +++ b/src/corelib/serialization/qtextstream.cpp @@ -2056,7 +2056,7 @@ bool QTextStreamPrivate::getReal(double *f) // nan/+inf/-inf, so here we also check for uppercase and mixed // case versions. if (!qstricmp(buf, "nan") || !qstricmp(buf, "+nan") || !qstricmp(buf, "-nan")) { - *f = qSNaN(); + *f = qQNaN(); return true; } else if (!qstricmp(buf, "+inf") || !qstricmp(buf, "inf")) { *f = qInf(); |