[nemiver] Various style cleanups



commit 85f1ab7d682fab5a6afe0ae0e37f791e660f6505
Author: Dodji Seketeli <dodji seketeli org>
Date:   Mon Apr 25 13:51:22 2011 +0200

    Various style cleanups
    
    	* src/common/nmv-loc.h: Remove various useless spaces.
    	* src/common/nmv-safe-ptr.h (DefaultRef::operator()):  Make the
    	parameter be unnamed as it's unused.
    	(operator=, swap): Re-indent.
    	* src/confmgr/nmv-i-conf-mgr.h (load_iface_and_confmgr): Shorten
    	long line.
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc
    	(DBGPerspective::init_actions)
    	(DBGPerspective::set_breakpoint_using_dialog): Likewise.
    	* src/workbench/nmv-workbench.cc (Workbench::do_init): Likewise.

 src/common/nmv-loc.h                            |    5 +++--
 src/common/nmv-safe-ptr.h                       |   17 ++++++++---------
 src/confmgr/nmv-i-conf-mgr.h                    |    4 ++--
 src/persp/dbgperspective/nmv-dbg-perspective.cc |   14 +++++++++-----
 src/workbench/nmv-workbench.cc                  |    6 ++++--
 5 files changed, 26 insertions(+), 20 deletions(-)
---
diff --git a/src/common/nmv-loc.h b/src/common/nmv-loc.h
index 277331f..8243a10 100644
--- a/src/common/nmv-loc.h
+++ b/src/common/nmv-loc.h
@@ -59,14 +59,14 @@ class NEMIVER_API Loc
         : m_kind (UNDEFINED_LOC_KIND)
     {
     }
-    
-    
+
     Loc (const Loc &a)
       : m_kind (a.m_kind)
     {
     }
 
  public:
+
     Kind kind () const {return m_kind;}
     virtual ~Loc () {};
 }; // end class Loc
@@ -81,6 +81,7 @@ class NEMIVER_API SourceLoc : public Loc
     int m_line_number;
 
  public:
+
     SourceLoc (const UString &a_file_path,
                int a_line_number)
         : m_file_path (a_file_path),
diff --git a/src/common/nmv-safe-ptr.h b/src/common/nmv-safe-ptr.h
index 0564812..23195a3 100644
--- a/src/common/nmv-safe-ptr.h
+++ b/src/common/nmv-safe-ptr.h
@@ -38,7 +38,7 @@ namespace common {
 struct DefaultRef
 {
     void
-    operator () (const void* a_ptr) {if (a_ptr) {}}
+    operator () (const void*) {}
 }
 ; //end struct DefaultReference
 
@@ -103,12 +103,12 @@ public:
 
     SafePtr<PointerType, ReferenceFunctor, UnreferenceFunctor>&
     operator= (const SafePtr<PointerType,
-               ReferenceFunctor,
-               UnreferenceFunctor> &a_safe_ptr)
+                             ReferenceFunctor,
+                             UnreferenceFunctor> &a_safe_ptr)
     {
         SafePtr<PointerType,
-        ReferenceFunctor,
-        UnreferenceFunctor> temp (a_safe_ptr);
+                ReferenceFunctor,
+                UnreferenceFunctor> temp (a_safe_ptr);
         swap (temp);
         return *this;
     }
@@ -227,13 +227,12 @@ public:
         return  pointer;
     }
 
-
     void
     swap (SafePtr<PointerType,
-          ReferenceFunctor,
-          UnreferenceFunctor> &a_safe_ptr)
+                  ReferenceFunctor,
+                  UnreferenceFunctor> &a_safe_ptr)
     {
-        PointerType *const tmp(m_pointer);
+        PointerType *const tmp (m_pointer);
         m_pointer = a_safe_ptr.m_pointer;
         a_safe_ptr.m_pointer = tmp;
     }
diff --git a/src/confmgr/nmv-i-conf-mgr.h b/src/confmgr/nmv-i-conf-mgr.h
index fccf5fa..9ee194c 100644
--- a/src/confmgr/nmv-i-conf-mgr.h
+++ b/src/confmgr/nmv-i-conf-mgr.h
@@ -126,8 +126,8 @@ load_iface_and_confmgr (const UString &a_dynmod_name,
 
     // Load the confmgr interface
     a_confmgr =
-        common::DynamicModuleManager::load_iface_with_default_manager<IConfMgr>
-        (CONFIG_MGR_MODULE_NAME, "IConfMgr");
+      common::DynamicModuleManager::load_iface_with_default_manager<IConfMgr>
+      (CONFIG_MGR_MODULE_NAME, "IConfMgr");
 
     //Load the IDebugger iterface
     TSafePtr iface =
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index 9e5e738..38a4062 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -3427,7 +3427,8 @@ DBGPerspective::init_actions ()
             nil_stock_id,
             _("Jump to cursor"),
             _("Jump to  the currently selected line"),
-            sigc::mem_fun (*this, &DBGPerspective::on_jump_to_current_location_action),
+            sigc::mem_fun
+            (*this, &DBGPerspective::on_jump_to_current_location_action),
             ActionEntry::DEFAULT,
             "",
             false
@@ -3436,9 +3437,11 @@ DBGPerspective::init_actions ()
             "JumpAndBreakToCurrentLocationMenuItemAction",
             nil_stock_id,
             _("Jump and stop to cursor"),
-            _("Sets a breakpoint to the current currently selected line and jump there"),
-            sigc::mem_fun (*this,
-                           &DBGPerspective::on_jump_and_break_to_current_location_action),
+            _("Sets a breakpoint to the currently "
+              "selected line and jump there"),
+            sigc::mem_fun
+            (*this,
+             &DBGPerspective::on_jump_and_break_to_current_location_action),
             ActionEntry::DEFAULT,
             "",
             false
@@ -7801,9 +7804,10 @@ DBGPerspective::set_breakpoint_using_dialog ()
 
     UString function_name;
     SourceEditor *source_editor = get_current_source_editor ();
+
     if (source_editor) {
         Glib::RefPtr<gtksourceview::SourceBuffer> buffer =
-                            source_editor->source_view ().get_source_buffer ();
+            source_editor->source_view ().get_source_buffer ();
         THROW_IF_FAIL (buffer);
 
         Gtk::TextIter start, end;
diff --git a/src/workbench/nmv-workbench.cc b/src/workbench/nmv-workbench.cc
index 5a93af6..94c9db7 100644
--- a/src/workbench/nmv-workbench.cc
+++ b/src/workbench/nmv-workbench.cc
@@ -353,10 +353,12 @@ Workbench::do_init (Gtk::Main &a_main)
 {
     LOG_FUNCTION_SCOPE_NORMAL_DD;
 
-    DynamicModule::Loader *loader = get_dynamic_module ().get_module_loader ();
+    DynamicModule::Loader *loader =
+        get_dynamic_module ().get_module_loader ();
     THROW_IF_FAIL (loader);
 
-    DynamicModuleManager *dynmod_manager = loader->get_dynamic_module_manager ();
+    DynamicModuleManager *dynmod_manager =
+        loader->get_dynamic_module_manager ();
     THROW_IF_FAIL (dynmod_manager);
 
     m_priv->main = &a_main;



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