summaryrefslogtreecommitdiff
path: root/rsc/source/res
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:05:38 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:24 +0100
commitcf54f2a10f128cf5d79397911b5be710e7081963 (patch)
treecbaf1036cfca3572cb5d7b1df7c2f46de99168cb /rsc/source/res
parentd963fd84256081ce6a2e0ab1e9c0516cfb0b38b9 (diff)
Clean up C-style casts from pointers to void
Change-Id: I85d6761e72ba2f67a1d67a94cae674cbb271b43f
Diffstat (limited to 'rsc/source/res')
-rw-r--r--rsc/source/res/rscarray.cxx2
-rw-r--r--rsc/source/res/rscclass.cxx10
-rw-r--r--rsc/source/res/rscconst.cxx10
-rw-r--r--rsc/source/res/rsccont.cxx14
-rw-r--r--rsc/source/res/rscflag.cxx2
-rw-r--r--rsc/source/res/rscmgr.cxx2
-rw-r--r--rsc/source/res/rscrange.cxx6
-rw-r--r--rsc/source/res/rscstr.cxx6
8 files changed, 26 insertions, 26 deletions
diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx
index 3e7c70a9b63c..4db3fb2c8dbb 100644
--- a/rsc/source/res/rscarray.cxx
+++ b/rsc/source/res/rscarray.cxx
@@ -94,7 +94,7 @@ RSCINST RscArray::Create( RSCINST * pInst, const RSCINST & rDflt,
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA) rtl_allocateMemory( Size() );
+ aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( Size() ));
}
else
aInst = *pInst;
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index 4c50c2eb6657..7d7861b607de 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -148,7 +148,7 @@ RSCINST RscClass::Create( RSCINST * pInst,
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA) rtl_allocateMemory( Size() );
+ aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( Size() ));
}
else
aInst = *pInst;
@@ -234,13 +234,13 @@ ERRTYPE RscClass::SetVariable( Atom nVarName,
{
if( pVarTypeList )
{
- pVarTypeList = (VARTYPE_STRUCT *) rtl_reallocateMemory( (void *)pVarTypeList,
- ((nEntries +1) * sizeof( VARTYPE_STRUCT )) );
+ pVarTypeList = static_cast<VARTYPE_STRUCT *>(rtl_reallocateMemory( (void *)pVarTypeList,
+ ((nEntries +1) * sizeof( VARTYPE_STRUCT )) ));
}
else
{
- pVarTypeList = (VARTYPE_STRUCT *) rtl_allocateMemory( ((nEntries +1)
- * sizeof( VARTYPE_STRUCT )) );
+ pVarTypeList = static_cast<VARTYPE_STRUCT *>(rtl_allocateMemory( ((nEntries +1)
+ * sizeof( VARTYPE_STRUCT )) ));
}
pVarTypeList[ nEntries ].nVarName = nVarName;
pVarTypeList[ nEntries ].nMask = nMask;
diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx
index d8273dd89c44..77b67475516c 100644
--- a/rsc/source/res/rscconst.cxx
+++ b/rsc/source/res/rscconst.cxx
@@ -47,10 +47,10 @@ RSCCLASS_TYPE RscConst::GetClassType() const
ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue )
{
if( pVarArray )
- pVarArray = (VarEle *) rtl_reallocateMemory( (void *)pVarArray,
- ((nEntries +1) * sizeof( VarEle )) );
+ pVarArray = static_cast<VarEle *>(rtl_reallocateMemory( (void *)pVarArray,
+ ((nEntries +1) * sizeof( VarEle )) ));
else
- pVarArray = (VarEle *) rtl_allocateMemory( ((nEntries +1) * sizeof( VarEle )) );
+ pVarArray = static_cast<VarEle *>(rtl_allocateMemory( ((nEntries +1) * sizeof( VarEle )) ));
pVarArray[ nEntries ].nId = nVarName;
pVarArray[ nEntries ].lValue = lValue;
nEntries++;
@@ -159,8 +159,8 @@ RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA)
- rtl_allocateMemory( sizeof( RscEnumInst ) );
+ aInst.pData = static_cast<CLASS_DATA>(
+ rtl_allocateMemory( sizeof( RscEnumInst ) ));
}
else
aInst = *pInst;
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index 917f64df9bb1..e0ddc76ff4bc 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -79,7 +79,7 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt,
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA) rtl_allocateMemory( Size() );
+ aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( Size() ));
}
else
aInst = *pInst;
@@ -105,8 +105,8 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt,
{
*pClassData = *pDfltClassData;
pClassData->pEntries =
- (ENTRY_STRUCT *)rtl_allocateMemory( sizeof( ENTRY_STRUCT )
- * pClassData->nEntries );
+ static_cast<ENTRY_STRUCT *>(rtl_allocateMemory( sizeof( ENTRY_STRUCT )
+ * pClassData->nEntries ));
for (sal_uInt32 i = 0; i < pClassData->nEntries; i++ )
{
pClassData->pEntries[ i ].Create();
@@ -213,14 +213,14 @@ ERRTYPE RscBaseCont::GetElement( const RSCINST & rInst, const RscId & rEleName,
if( pClassData->pEntries )
{
pClassData->pEntries =
- (ENTRY_STRUCT *)rtl_reallocateMemory( pClassData->pEntries,
- sizeof( ENTRY_STRUCT ) * (pClassData->nEntries +1) );
+ static_cast<ENTRY_STRUCT *>(rtl_reallocateMemory( pClassData->pEntries,
+ sizeof( ENTRY_STRUCT ) * (pClassData->nEntries +1) ));
}
else
{
pClassData->pEntries =
- (ENTRY_STRUCT *)rtl_allocateMemory( sizeof( ENTRY_STRUCT )
- * (pClassData->nEntries +1) );
+ static_cast<ENTRY_STRUCT *>(rtl_allocateMemory( sizeof( ENTRY_STRUCT )
+ * (pClassData->nEntries +1) ));
}
pClassData->pEntries[ pClassData->nEntries ].Create();
diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx
index d78a6df8bcd6..d0f1573e1b3a 100644
--- a/rsc/source/res/rscflag.cxx
+++ b/rsc/source/res/rscflag.cxx
@@ -76,7 +76,7 @@ RSCINST RscFlag::CreateBasic( RSCINST * pInst )
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA) rtl_allocateMemory( Size() );
+ aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( Size() ));
}
else
aInst = *pInst;
diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx
index 086eb7f1ebdd..1f8e941d079f 100644
--- a/rsc/source/res/rscmgr.cxx
+++ b/rsc/source/res/rscmgr.cxx
@@ -44,7 +44,7 @@ RSCINST RscMgr::Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass )
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA) rtl_allocateMemory( Size() );
+ aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( Size() ));
}
else
aInst = *pInst;
diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx
index 07b914c12ab6..782076250297 100644
--- a/rsc/source/res/rscrange.cxx
+++ b/rsc/source/res/rscrange.cxx
@@ -90,7 +90,7 @@ RSCINST RscRange::Create( RSCINST * pInst, const RSCINST & rDflt,
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA)rtl_allocateMemory( sizeof( RscRangeInst ) );
+ aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( sizeof( RscRangeInst ) ));
}
else
aInst = *pInst;
@@ -202,7 +202,7 @@ RSCINST RscLongRange::Create( RSCINST * pInst, const RSCINST & rDflt,
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA) rtl_allocateMemory( sizeof( RscLongRangeInst ) );
+ aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( sizeof( RscLongRangeInst ) ));
}
else
aInst = *pInst;
@@ -278,7 +278,7 @@ RSCINST RscIdRange::Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnCla
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA)rtl_allocateMemory( sizeof( RscId ) );
+ aInst.pData = static_cast<CLASS_DATA>(rtl_allocateMemory( sizeof( RscId ) ));
}
else
aInst = *pInst;
diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx
index 3dbb9e308c0d..2e7ffee915c8 100644
--- a/rsc/source/res/rscstr.cxx
+++ b/rsc/source/res/rscstr.cxx
@@ -59,7 +59,7 @@ ERRTYPE RscString::SetString( const RSCINST & rInst, const char * pStr )
if( pStr )
{
sal_uInt32 nLen = strlen( pStr ) +1;
- pTmp = (char *)rtl_allocateMemory( nLen );
+ pTmp = static_cast<char *>(rtl_allocateMemory( nLen ));
memcpy( pTmp, pStr, nLen );
}
@@ -102,8 +102,8 @@ RSCINST RscString::Create( RSCINST * pInst, const RSCINST & rDflt,
if( !pInst )
{
aInst.pClass = this;
- aInst.pData = (CLASS_DATA)
- rtl_allocateMemory( sizeof( RscStringInst ) );
+ aInst.pData = static_cast<CLASS_DATA>(
+ rtl_allocateMemory( sizeof( RscStringInst ) ));
}
else
aInst = *pInst;