summaryrefslogtreecommitdiff
path: root/testtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-03 21:07:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-05 21:18:00 +0200
commitb1fba1afa1c1a5cf9074d2e9dd3e613ef0b318de (patch)
treecef115f02c6e68c14537e5dba3a60de048c8d91d /testtools
parent919dfc6f058cf246d517c8ab66b802d64c1b6fcb (diff)
Improved loplugin:cstylecast to reference types: testtools
Change-Id: I39ff292f420bb59e79f4cf83fb453cf0e1bd6228
Diffstat (limited to 'testtools')
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx14
-rw-r--r--testtools/source/bridgetest/cppobj.cxx2
2 files changed, 8 insertions, 8 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index f2c0d7544a78..a78ce00fc3f0 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -162,7 +162,7 @@ static bool equals( const TestData & rData1, const TestData & rData2 )
sal_Int32 nLen;
if ((rData1.Sequence == rData2.Sequence) &&
- equals( (const TestElement &)rData1, (const TestElement &)rData2 ) &&
+ equals( static_cast<const TestElement &>(rData1), static_cast<const TestElement &>(rData2) ) &&
(nLen = rData1.Sequence.getLength()) == rData2.Sequence.getLength())
{
// once again by hand sequence ==
@@ -355,8 +355,8 @@ static bool performTest(
TestData aData; // test against this data
Reference< XInterface > xI(new MyClass);
assign(
- (TestElement &) aData, true, '@', 17, 0x1234, 0xFEDC, 0x12345678,
- 0xFEDCBA98, SAL_CONST_INT64(0x123456789ABCDEF0),
+ static_cast<TestElement &>(aData), true, '@', 17, 0x1234, 0xFEDC,
+ 0x12345678, 0xFEDCBA98, SAL_CONST_INT64(0x123456789ABCDEF0),
SAL_CONST_UINT64(0xFEDCBA9876543210), 17.0815f, 3.1415926359,
TestEnum_LOLA, STRING_TEST_CONSTANT, xI,
Any(&xI, cppu::UnoType<XInterface>::get()));
@@ -368,10 +368,10 @@ static bool performTest(
// aSetData is a manually copy of aData for first setting:
TestData aSetData;
assign(
- (TestElement &) aSetData, aData.Bool, aData.Char, aData.Byte,
- aData.Short, aData.UShort, aData.Long, aData.ULong, aData.Hyper,
- aData.UHyper, aData.Float, aData.Double, aData.Enum, aData.String,
- xI, Any(&xI, cppu::UnoType<XInterface>::get()));
+ static_cast<TestElement &>(aSetData), aData.Bool, aData.Char,
+ aData.Byte, aData.Short, aData.UShort, aData.Long, aData.ULong,
+ aData.Hyper, aData.UHyper, aData.Float, aData.Double, aData.Enum,
+ aData.String, xI, Any(&xI, cppu::UnoType<XInterface>::get()));
aSetData.Sequence.realloc(2);
aSetData.Sequence[0] = *static_cast<TestElement const *>(&aSetData);
// aSetData.Sequence[1] is empty
diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx
index e175fc9c7c44..2d4c5eee75c9 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -111,7 +111,7 @@ static void assign( TestData & rData,
const css::uno::Any& rAny,
const css::uno::Sequence< TestElement >& rSequence )
{
- assign( (TestElement &)rData,
+ assign( static_cast<TestElement &>(rData),
bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
eEnum, rStr, xTest, rAny );
rData.Sequence = rSequence;