Kaydet (Commit) 1c5f64ec authored tarafından Tor Lillqvist's avatar Tor Lillqvist

WaE: loplugin:redundantcast

Change-Id: Id7d4d937e1bdb94571e774befc5bcc1ab6a73f34
üst 4e858c5e
...@@ -220,7 +220,7 @@ public: ...@@ -220,7 +220,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; }
...@@ -233,7 +233,7 @@ public: ...@@ -233,7 +233,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