[beast: 1/28] BEAST: bstmain.cc: extract method main_cleanup



commit 133b64948792cb67e069fabc3b7063387745db3d
Author: Tim Janik <timj gnu org>
Date:   Mon Nov 30 23:56:55 2015 +0100

    BEAST: bstmain.cc: extract method main_cleanup
    
    Signed-off-by: Tim Janik <timj gnu org>

 beast-gtk/bstmain.cc |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/beast-gtk/bstmain.cc b/beast-gtk/bstmain.cc
index 51f87a1..039f0a3 100644
--- a/beast-gtk/bstmain.cc
+++ b/beast-gtk/bstmain.cc
@@ -60,9 +60,10 @@ server_registration (SfiProxy     server,
     }
 }
 
+static void     main_cleanup ();
+
 int
-main (int   argc,
-      char *argv[])
+main (int argc, char *argv[])
 {
   GdkPixbufAnimation *anim;
   gchar *string;
@@ -408,6 +409,14 @@ main (int   argc,
       g_free (file_name);
     }
 
+  main_cleanup();
+
+  return 0;
+}
+
+static void
+main_cleanup ()
+{
   // perform necessary cleanup cycles
   GDK_THREADS_LEAVE ();
   while (g_main_iteration (FALSE))
@@ -421,7 +430,6 @@ main (int   argc,
   bse_object_debug_leaks ();
   Bse::TaskRegistry::remove (Rapicorn::ThisThread::thread_pid());
 
-  return 0;
 }
 
 /// wake up the main context used by the Beast main event looop.


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