]> git.tdb.fi Git - libs/core.git/blobdiff - source/debug/profiler.h
Use default member initializers and constructor delegation
[libs/core.git] / source / debug / profiler.h
index 521ce959c5de7cae234c04ae8de5861ac3f6b42e..5018c7f2d654100b7a0de87901d1c0708f114eeb 100644 (file)
@@ -37,27 +37,23 @@ public:
        struct ScopeInfo
        {
                Time::TimeStamp first_call;
        struct ScopeInfo
        {
                Time::TimeStamp first_call;
-               unsigned calls;
+               unsigned calls = 0;
                Time::TimeDelta total_time;
                Time::TimeDelta self_time;
                Time::TimeDelta avg_time;
                Time::TimeDelta total_time;
                Time::TimeDelta self_time;
                Time::TimeDelta avg_time;
-               float calls_per_sec;
+               float calls_per_sec = 0;
                std::vector<CallInfo> history;
                std::vector<CallInfo> history;
-               unsigned hist_pos;
-               bool hist_full;
+               unsigned hist_pos = 0;
+               bool hist_full = false;
                std::map<std::string, unsigned> called_from;
                std::map<std::string, unsigned> called_from;
-
-               ScopeInfo();
        };
 
 private:
        };
 
 private:
-       unsigned period;
+       unsigned period = 0;
        std::map<std::string, ScopeInfo> scopes;
        std::map<std::string, ScopeInfo> scopes;
-       ProfilingScope *inner;
+       ProfilingScope *inner = 0;
 
 public:
 
 public:
-       Profiler();
-
        /** Sets the averaging period for timing data, measured in calls.  Previous
        average timings are cleared. */
        void set_period(unsigned p);
        /** Sets the averaging period for timing data, measured in calls.  Previous
        average timings are cleared. */
        void set_period(unsigned p);