[nemiver/profiler: 3/11] Clean-ups



commit 46c9d1ff67ba0f68f8b946d7ca295c4182282009
Author: Fabien Parent <parent f gmail com>
Date:   Mon May 28 11:47:40 2012 +0200

    Clean-ups

 src/main.cc                     |    6 +++---
 src/workbench/nmv-i-workbench.h |    2 +-
 src/workbench/nmv-workbench.cc  |    7 +++++--
 3 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index 86f3c16..e55481e 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -304,12 +304,12 @@ main (int a_argc, char *a_argv[])
     THROW_IF_FAIL (s_workbench);
     LOG_D ("workbench refcount: " <<  (int) s_workbench->get_refcount (),
            "refcount-domain");
-    s_workbench->do_init_dev ();
+    s_workbench->load_perspectives ();
 
-    if (parse_command_line (a_argc, a_argv) == false)
+    if (!parse_command_line (a_argc, a_argv))
         return -1;
 
-    if (process_non_gui_options () != true) {
+    if (!process_non_gui_options ()) {
         return -1;
     }
 
diff --git a/src/workbench/nmv-i-workbench.h b/src/workbench/nmv-i-workbench.h
index f668ef5..02a5ac8 100644
--- a/src/workbench/nmv-i-workbench.h
+++ b/src/workbench/nmv-i-workbench.h
@@ -144,7 +144,7 @@ public:
 
     virtual void select_perspective (IPerspectiveSafePtr &a_perspective) = 0;
 
-    virtual void do_init_dev () = 0;
+    virtual void load_perspectives () = 0;
 
     /// set the configuration manager used by this interface
     virtual void do_init (IConfMgrSafePtr &) = 0;
diff --git a/src/workbench/nmv-workbench.cc b/src/workbench/nmv-workbench.cc
index b4e24b8..19056b0 100644
--- a/src/workbench/nmv-workbench.cc
+++ b/src/workbench/nmv-workbench.cc
@@ -120,7 +120,7 @@ private:
 public:
     Workbench (DynamicModule *a_dynmod);
     virtual ~Workbench ();
-    void do_init_dev ();
+    void load_perspectives ();
     void do_init (Gtk::Main &a_main);
     void do_init (IConfMgrSafePtr &);
     void select_perspective (IPerspectiveSafePtr &a_perspective);
@@ -376,8 +376,10 @@ Workbench::do_init (IConfMgrSafePtr &a_conf_mgr)
 }
 
 void
-Workbench::do_init_dev ()
+Workbench::load_perspectives ()
 {
+    THROW_IF_FAIL (m_priv);
+
     DynamicModule::Loader *loader =
         get_dynamic_module ().get_module_loader ();
     THROW_IF_FAIL (loader);
@@ -388,6 +390,7 @@ Workbench::do_init_dev ()
 
     m_priv->plugin_manager =
         PluginManagerSafePtr (new PluginManager (*dynmod_manager));
+    THROW_IF_FAIL (m_priv->plugin_manager);
 
     NEMIVER_TRY
 



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