mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[PSDK][CRT] Add some casts to make GCC 8 happy
This commit is contained in:
parent
846cd55294
commit
48f3efa254
2 changed files with 5 additions and 5 deletions
|
@ -485,7 +485,7 @@ inline _variant_t::_variant_t(VARIANT &varSrc,bool fCopy) {
|
||||||
::VariantInit(this);
|
::VariantInit(this);
|
||||||
_com_util::CheckError(::VariantCopy(this,&varSrc));
|
_com_util::CheckError(::VariantCopy(this,&varSrc));
|
||||||
} else {
|
} 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;
|
V_VT(&varSrc) = VT_EMPTY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1149,7 +1149,7 @@ inline void _variant_t::Attach(VARIANT &varSrc)
|
||||||
|
|
||||||
Clear();
|
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;
|
V_VT(&varSrc) = VT_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ public:
|
||||||
{
|
{
|
||||||
// allocate extra capacity for optimization
|
// allocate extra capacity for optimization
|
||||||
const int nNewCapacity = (m_nCount + 1) + c_nGrow;
|
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)
|
if (pNewData == NULL)
|
||||||
return FALSE; // failure
|
return FALSE; // failure
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ public:
|
||||||
// move range [nIndex + 1, m_nCount) to nIndex
|
// move range [nIndex + 1, m_nCount) to nIndex
|
||||||
const int nRightCount = m_nCount - (nIndex + 1);
|
const int nRightCount = m_nCount - (nIndex + 1);
|
||||||
const int nRightSize = nRightCount * sizeof(T);
|
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
|
// decrement
|
||||||
--m_nCount;
|
--m_nCount;
|
||||||
|
@ -184,7 +184,7 @@ public:
|
||||||
|
|
||||||
int nNewCount = src.GetSize();
|
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);
|
ATLASSERT(pNewData);
|
||||||
if (pNewData == NULL)
|
if (pNewData == NULL)
|
||||||
return *this; // failure
|
return *this; // failure
|
||||||
|
|
Loading…
Reference in a new issue