From: Marc Mutz Date: Fri, 28 Sep 2012 12:36:27 +0000 (+0200) Subject: QQnxWindow: use a proper cast X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9801b2c9960aa5512aa78828c460a76e6224e5d6;p=profile%2Fivi%2Fqtbase.git QQnxWindow: use a proper cast 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 Reviewed-by: Sean Harmer --- diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 42bc5b6..ed3fc5b 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -519,10 +519,7 @@ void QQnxWindow::setParent(const QPlatformWindow *window) { 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((QPlatformWindow *)window); + QQnxWindow* const newParent = static_cast(const_cast(window)); if (newParent == m_parentWindow) return;