explicitly cast to the type malloc-ed

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2016-10-18 21:12:13 +00:00
parent 37bfbb8042
commit 19849e49c2

View file

@ -267,7 +267,7 @@ void QContiguousCache<T>::clear()
template <typename T>
inline QContiguousCacheData *QContiguousCache<T>::allocate(int aalloc)
{
return ::malloc(sizeOfTypedData() + (aalloc - 1) * sizeof(T));
return static_cast<QContiguousCacheData*>(::malloc(sizeOfTypedData() + (aalloc - 1) * sizeof(T)));
}
template <typename T>