summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:06:09 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:24 +0100
commit77d1a61c95779728799277565de3d6528ddc594b (patch)
tree0b04a079a0a47e2c2efaf6e2318cf447cdff0096 /sc/source/core
parenta98887d9b82327d4183d24a56ec0636953515aa3 (diff)
Clean up C-style casts from pointers to void
Change-Id: Ie42848cc9f2d74beeb76e1c5e49ef40b99f6d5f6
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/dptabsrc.cxx2
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx16
-rw-r--r--sc/source/core/tool/adiasync.cxx4
-rw-r--r--sc/source/core/tool/rangelst.cxx4
-rw-r--r--sc/source/core/tool/rangenam.cxx4
5 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index f96291e3c67e..36d36fc052fb 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -87,7 +87,7 @@ SC_SIMPLE_SERVICE_INFO( ScDPMember, "ScDPMember", "com.sun.star.sheet.
static bool lcl_GetBoolFromAny( const uno::Any& aAny )
{
if ( aAny.getValueTypeClass() == uno::TypeClass_BOOLEAN )
- return *(sal_Bool*)aAny.getValue();
+ return *static_cast<sal_Bool const *>(aAny.getValue());
return false;
}
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 47144da11604..085a582ec0dd 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -211,9 +211,9 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpClmem << " size " << szHostBuffer);
- double* pNanBuffer = (double*)clEnqueueMapBuffer(
+ double* pNanBuffer = static_cast<double*>(clEnqueueMapBuffer(
kEnv.mpkCmdQueue, mpClmem, CL_TRUE, CL_MAP_WRITE, 0,
- szHostBuffer, 0, NULL, NULL, &err);
+ szHostBuffer, 0, NULL, NULL, &err));
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
@@ -806,9 +806,9 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpClmem << " size " << szHostBuffer);
- pHashBuffer = (cl_uint*)clEnqueueMapBuffer(
+ pHashBuffer = static_cast<cl_uint*>(clEnqueueMapBuffer(
kEnv.mpkCmdQueue, mpClmem, CL_TRUE, CL_MAP_WRITE, 0,
- szHostBuffer, 0, NULL, NULL, &err);
+ szHostBuffer, 0, NULL, NULL, &err));
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
@@ -837,9 +837,9 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Created buffer " << mpClmem << " size " << szHostBuffer);
- pHashBuffer = (cl_uint*)clEnqueueMapBuffer(
+ pHashBuffer = static_cast<cl_uint*>(clEnqueueMapBuffer(
kEnv.mpkCmdQueue, mpClmem, CL_TRUE, CL_MAP_WRITE, 0,
- szHostBuffer, 0, NULL, NULL, &err);
+ szHostBuffer, 0, NULL, NULL, &err));
if (CL_SUCCESS != err)
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
@@ -4086,11 +4086,11 @@ public:
::opencl::setKernelEnv(&kEnv);
cl_int err;
- mpResBuf = (double*)clEnqueueMapBuffer(kEnv.mpkCmdQueue,
+ mpResBuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
mpCLResBuf,
CL_TRUE, CL_MAP_READ, 0,
mnGroupLength * sizeof(double), 0, NULL, NULL,
- &err);
+ &err));
if (err != CL_SUCCESS)
{
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index 5bcb4f986988..5daecfaf85d3 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -100,11 +100,11 @@ void ScAddInAsync::CallBack( sal_uLong nHandleP, void* pData )
switch ( p->meType )
{
case ParamType::PTR_DOUBLE :
- p->nVal = *(double*)pData;
+ p->nVal = *static_cast<double*>(pData);
break;
case ParamType::PTR_STRING :
{
- sal_Char* pChar = (sal_Char*)pData;
+ sal_Char* pChar = static_cast<sal_Char*>(pData);
if ( p->pStr )
*p->pStr = OUString( pChar, strlen(pChar),osl_getThreadTextEncoding() );
else
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index b1bd53adbc4d..44d740f8d93e 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -1387,8 +1387,8 @@ struct ScRangePairNameSort
extern "C"
int SAL_CALL ScRangePairList_QsortNameCompare( const void* p1, const void* p2 )
{
- const ScRangePairNameSort* ps1 = (const ScRangePairNameSort*)p1;
- const ScRangePairNameSort* ps2 = (const ScRangePairNameSort*)p2;
+ const ScRangePairNameSort* ps1 = static_cast<const ScRangePairNameSort*>(p1);
+ const ScRangePairNameSort* ps2 = static_cast<const ScRangePairNameSort*>(p2);
const ScAddress& rStartPos1 = ps1->pPair->GetRange(0).aStart;
const ScAddress& rStartPos2 = ps2->pPair->GetRange(0).aStart;
OUString aStr1, aStr2;
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index a8b4c7bb2642..616ec8fd6884 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -641,8 +641,8 @@ extern "C"
int SAL_CALL ScRangeData_QsortNameCompare( const void* p1, const void* p2 )
{
return (int) ScGlobal::GetCollator()->compareString(
- (*(const ScRangeData**)p1)->GetName(),
- (*(const ScRangeData**)p2)->GetName() );
+ (*static_cast<const ScRangeData* const *>(p1))->GetName(),
+ (*static_cast<const ScRangeData* const *>(p2))->GetName() );
}
bool operator<(const ScRangeData& left, const ScRangeData& right)