Fix qfloat16 methods definition without declaration when using Q_QDOC
This fixes qtdoc failing to build on i586 because of an assertion in libclang since Q_QDOC is defined and thus the declaration of the qfloat16(float) constructor and operator float() are removed, thus their definitions should be removed too, which is what this patch does. Fixes: QTBUG-72725 Done-with: Michal Srb <msrb@suse.com> Change-Id: I6424873425d46345e09f411f9ce88f2520825da4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
This commit is contained in:
parent
c879fc2ab7
commit
9ab04795e2
@ -123,6 +123,7 @@ Q_REQUIRED_RESULT inline bool qIsNull(qfloat16 f) Q_DECL_NOTHROW
|
||||
inline int qIntCast(qfloat16 f) Q_DECL_NOTHROW
|
||||
{ return int(static_cast<float>(f)); }
|
||||
|
||||
#ifndef Q_QDOC
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wc99-extensions")
|
||||
QT_WARNING_DISABLE_GCC("-Wold-style-cast")
|
||||
@ -162,6 +163,7 @@ inline qfloat16::operator float() const Q_DECL_NOTHROW
|
||||
return f;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
inline qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user