Kaydet (Commit) 0648f2c2 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:redundantcast

Change-Id: Ibb641ab458e49a30637f1dff715480c0ed5d8b42
üst be8512f9
...@@ -219,7 +219,7 @@ public: ...@@ -219,7 +219,7 @@ public:
LeakTestObject *pNew = new LeakTestObject(); LeakTestObject *pNew = new LeakTestObject();
pNew->mxRef = VclPtr< LeakTestClass< vcl_type > >::Create( pNew->mbDeleted, pNew->mxRef = VclPtr< LeakTestClass< vcl_type > >::Create( pNew->mbDeleted,
std::forward<Arg>(arg)...); std::forward<Arg>(arg)...);
pNew->mpRef = reinterpret_cast<void *>(static_cast<vcl::Window *>(pNew->mxRef)); pNew->mpRef = static_cast<void *>(static_cast<vcl::Window *>(pNew->mxRef));
return pNew; return pNew;
} }
VclPtr<vcl::Window> getRef() { return mxRef; } VclPtr<vcl::Window> getRef() { return mxRef; }
...@@ -232,7 +232,7 @@ public: ...@@ -232,7 +232,7 @@ public:
if (!mbDeleted) if (!mbDeleted)
{ {
OUStringBuffer aMsg = "Type '"; OUStringBuffer aMsg = "Type '";
vcl::Window *pWin = reinterpret_cast<vcl::Window *>(mpRef); vcl::Window *pWin = static_cast<vcl::Window *>(mpRef);
aMsg.appendAscii(typeid(*pWin).name()); aMsg.appendAscii(typeid(*pWin).name());
aMsg.append("' not freed after dispose"); aMsg.append("' not freed after dispose");
CPPUNIT_FAIL(OUStringToOString(aMsg.makeStringAndClear(), CPPUNIT_FAIL(OUStringToOString(aMsg.makeStringAndClear(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment