Replace a C-cast with a const_cast.
Casting doesn't care about nullptr, so don't check for one.
Change-Id: I18a3e8f21d73b73385e567c7ceaf64e36aaa2cf3
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
{
qWindowDebug() << Q_FUNC_INFO << "window =" << this->window() << "platformWindow =" << window;
// Cast away the const, we need to modify the hierarchy.
- QQnxWindow *newParent = 0;
-
- if (window)
- newParent = static_cast<QQnxWindow*>((QPlatformWindow *)window);
+ QQnxWindow* const newParent = static_cast<QQnxWindow*>(const_cast<QPlatformWindow*>(window));
if (newParent == m_parentWindow)
return;