[glom] Remove redundant casts to AppWindow.



commit 887a349155e18c52623fb6e25cc89718cb79b6c8
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 15 08:36:23 2016 +0100

    Remove redundant casts to AppWindow.
    
    Noticed by the IntelliJ CLion inspections.

 glom/frame_glom.cc            |    6 +++---
 glom/show_progress_message.cc |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 1c0965e..d64e34f 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -1736,7 +1736,7 @@ void Frame_Glom::on_developer_dialog_hide()
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 void Frame_Glom::on_connection_initialize_progress()
 {
-  AppWindow *app = dynamic_cast<AppWindow*>(AppWindow::get_appwindow());
+  auto *app = AppWindow::get_appwindow();
   if(app)
     app->pulse_progress_message();
 }
@@ -1744,14 +1744,14 @@ void Frame_Glom::on_connection_initialize_progress()
 
 void Frame_Glom::on_connection_startup_progress()
 {
-  AppWindow *app = dynamic_cast<AppWindow*>(AppWindow::get_appwindow());
+  auto *app = AppWindow::get_appwindow();
   if(app)
     app->pulse_progress_message();
 }
 
 void Frame_Glom::on_connection_cleanup_progress()
 {
-  AppWindow *app = dynamic_cast<AppWindow*>(AppWindow::get_appwindow());
+  auto *app = AppWindow::get_appwindow();
   if(app)
     app->pulse_progress_message();
 }
diff --git a/glom/show_progress_message.cc b/glom/show_progress_message.cc
index ab78199..c3cf055 100644
--- a/glom/show_progress_message.cc
+++ b/glom/show_progress_message.cc
@@ -28,7 +28,7 @@ namespace Glom
 {
 
 ShowProgressMessage::ShowProgressMessage(const Glib::ustring& message)
-: m_app(dynamic_cast<AppWindow*>(AppWindow::get_appwindow())),
+: m_app(AppWindow::get_appwindow()),
   m_message(message)
 {
   g_return_if_fail(m_app);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]