mirror of
https://github.com/reactos/reactos.git
synced 2024-11-27 21:43:32 +08:00
[PSDK][CRT] Add some casts to make GCC 8 happy
This commit is contained in:
parent
846cd55294
commit
48f3efa254
@ -485,7 +485,7 @@ inline _variant_t::_variant_t(VARIANT &varSrc,bool fCopy) {
|
||||
::VariantInit(this);
|
||||
_com_util::CheckError(::VariantCopy(this,&varSrc));
|
||||
} else {
|
||||
_COM_MEMCPY_S(this,sizeof(varSrc),&varSrc,sizeof(varSrc));
|
||||
_COM_MEMCPY_S(static_cast<void*>(this),sizeof(varSrc),&varSrc,sizeof(varSrc));
|
||||
V_VT(&varSrc) = VT_EMPTY;
|
||||
}
|
||||
}
|
||||
@ -1149,7 +1149,7 @@ inline void _variant_t::Attach(VARIANT &varSrc)
|
||||
|
||||
Clear();
|
||||
|
||||
_COM_MEMCPY_S(this,sizeof(varSrc),&varSrc,sizeof(varSrc));
|
||||
_COM_MEMCPY_S(static_cast<void*>(this),sizeof(varSrc),&varSrc,sizeof(varSrc));
|
||||
V_VT(&varSrc) = VT_EMPTY;
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
{
|
||||
// allocate extra capacity for optimization
|
||||
const int nNewCapacity = (m_nCount + 1) + c_nGrow;
|
||||
T *pNewData = (T *)realloc(m_pData, nNewCapacity * sizeof(T));
|
||||
T *pNewData = (T *)realloc(static_cast<void *>(m_pData), nNewCapacity * sizeof(T));
|
||||
if (pNewData == NULL)
|
||||
return FALSE; // failure
|
||||
|
||||
@ -141,7 +141,7 @@ public:
|
||||
// move range [nIndex + 1, m_nCount) to nIndex
|
||||
const int nRightCount = m_nCount - (nIndex + 1);
|
||||
const int nRightSize = nRightCount * sizeof(T);
|
||||
memmove(&m_pData[nIndex], &m_pData[nIndex + 1], nRightSize);
|
||||
memmove(static_cast<void *>(&m_pData[nIndex]), &m_pData[nIndex + 1], nRightSize);
|
||||
|
||||
// decrement
|
||||
--m_nCount;
|
||||
@ -184,7 +184,7 @@ public:
|
||||
|
||||
int nNewCount = src.GetSize();
|
||||
|
||||
T *pNewData = (T *)realloc(m_pData, nNewCount * sizeof(T));
|
||||
T *pNewData = (T *)realloc(static_cast<void *>(m_pData), nNewCount * sizeof(T));
|
||||
ATLASSERT(pNewData);
|
||||
if (pNewData == NULL)
|
||||
return *this; // failure
|
||||
|
Loading…
Reference in New Issue
Block a user