← Back to team overview

kicad-developers team mailing list archive

[PATCH 1/4] PROF_COUNTER: initialize in initializer list

 

---
 include/profile.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/profile.h b/include/profile.h
index d3cb30bd2..fdfeea1ca 100644
--- a/include/profile.h
+++ b/include/profile.h
@@ -93,11 +93,10 @@ static inline void prof_end( prof_counter* aCnt )
 class PROF_COUNTER
 {
 public:
-    PROF_COUNTER( const std::string& name, bool autostart = true )
+    PROF_COUNTER( const std::string& name, bool autostart = true ) :
+        m_name( name ),
+        m_running( false )
     {
-        m_name = name;
-        m_running = false;
-
         if( autostart )
             start();
     }

Follow ups

References