diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-09-21 10:17:06 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-09-22 13:48:15 +0200 |
commit | a47a5932a64a8867077cab7c8efa57587b637481 (patch) | |
tree | 1dd8b2b94ea828c5ecec20a4f6123d0402c637f4 | |
parent | 8e0b0aa5c5fa13bb6a538ecaab0afef2a5d849b2 (diff) |
Mention in qRound*() docs about possibe UB
Change-Id: I0fcb9a72993959d028df1a9ef719938b1c555a2d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/global/qnumeric.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/global/qnumeric.cpp b/src/corelib/global/qnumeric.cpp index b846325964..16b2b7ca40 100644 --- a/src/corelib/global/qnumeric.cpp +++ b/src/corelib/global/qnumeric.cpp @@ -351,6 +351,9 @@ Q_CORE_EXPORT quint64 qFloatDistance(double a, double b) Example: \snippet code/src_corelib_global_qglobal.cpp 11A + + \note If the value \a d is outside the range of \c int, + the behavior is undefined. */ /*! \fn int qRound(float d) @@ -365,6 +368,9 @@ Q_CORE_EXPORT quint64 qFloatDistance(double a, double b) Example: \snippet code/src_corelib_global_qglobal.cpp 11B + + \note If the value \a d is outside the range of \c int, + the behavior is undefined. */ /*! \fn qint64 qRound64(double d) @@ -379,6 +385,9 @@ Q_CORE_EXPORT quint64 qFloatDistance(double a, double b) Example: \snippet code/src_corelib_global_qglobal.cpp 12A + + \note If the value \a d is outside the range of \c qint64, + the behavior is undefined. */ /*! \fn qint64 qRound64(float d) @@ -393,6 +402,9 @@ Q_CORE_EXPORT quint64 qFloatDistance(double a, double b) Example: \snippet code/src_corelib_global_qglobal.cpp 12B + + \note If the value \a d is outside the range of \c qint64, + the behavior is undefined. */ /*! |