summaryrefslogtreecommitdiff
path: root/testtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:28:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:28:58 +0200
commitd4e57ae426efd3666494374b5fd56ddf5ed82891 (patch)
treee54f714f43d63f51ab07821634e8c2ba1ddae78b /testtools
parentb2c8ea3a0253ce87f1b292fbb19b461a53c14912 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I13f61e80a27e58fba347173e5d84464553312836
Diffstat (limited to 'testtools')
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx6
-rw-r--r--testtools/source/bridgetest/cppobj.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index 9a31f007e1d5..6255349eea3a 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -385,7 +385,7 @@ static bool performTest(
bRet &= check(aData.Any == xI, "### unexpected any!");
bRet &= check(!(aData.Any != xI), "### unexpected any!");
aData.Sequence.realloc(2);
- aData.Sequence[0] = *(TestElement const *) &aData;
+ aData.Sequence[0] = *static_cast<TestElement const *>(&aData);
// aData.Sequence[1] is empty
// aSetData is a manually copy of aData for first setting:
TestData aSetData;
@@ -395,7 +395,7 @@ static bool performTest(
aData.UHyper, aData.Float, aData.Double, aData.Enum, aData.String,
xI, Any(&xI, cppu::UnoType<XInterface>::get()));
aSetData.Sequence.realloc(2);
- aSetData.Sequence[0] = *(TestElement const *) &aSetData;
+ aSetData.Sequence[0] = *static_cast<TestElement const *>(&aSetData);
// aSetData.Sequence[1] is empty
xLBT->setValues(
aSetData.Bool, aSetData.Char, aSetData.Byte, aSetData.Short,
@@ -1063,7 +1063,7 @@ uno_Sequence* cloneSequence(const uno_Sequence* val, const Type& type)
}
default:
uno_type_sequence_construct(
- &retSeq, type.getTypeLibType(), (void*) val->elements,
+ &retSeq, type.getTypeLibType(), const_cast<char *>(val->elements),
val->nElements, reinterpret_cast< uno_AcquireFunc >(cpp_acquire));
break;
}
diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index a468d900492e..d21d753ae470 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -1170,7 +1170,7 @@ Sequence< OUString > Test_Impl::getSupportedServiceNames()
static Reference< XInterface > SAL_CALL Test_Impl_create(
SAL_UNUSED_PARAMETER const Reference< XMultiServiceFactory > & )
{
- return Reference< XInterface >( (XBridgeTest *)new Test_Impl() );
+ return Reference< XInterface >( static_cast<XBridgeTest *>(new Test_Impl()) );
}
}