Metatype: Silence MSVC warnings about unused variables.
Turn around if's. Change-Id: Ica6f7f54098a567816ce3918f6fe5d8d2c072e01 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
This commit is contained in:
parent
6c4aa14ecc
commit
0b6d4a2d65
@ -152,24 +152,24 @@ void qMetaTypeDeleteHelper(T *t)
|
||||
template <typename T>
|
||||
void *qMetaTypeCreateHelper(const T *t)
|
||||
{
|
||||
if (!t)
|
||||
return new T();
|
||||
return new T(*static_cast<const T*>(t));
|
||||
if (t)
|
||||
return new T(*static_cast<const T*>(t));
|
||||
return new T();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void qMetaTypeDestructHelper(T *t)
|
||||
{
|
||||
Q_UNUSED(t) // Silence MSVC that warns for POD types.
|
||||
t->~T();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void *qMetaTypeConstructHelper(void *where, const T *t)
|
||||
{
|
||||
if (!t)
|
||||
return new (where) T;
|
||||
else
|
||||
if (t)
|
||||
return new (where) T(*static_cast<const T*>(t));
|
||||
return new (where) T;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DATASTREAM
|
||||
|
Loading…
Reference in New Issue
Block a user