diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-04 16:19:54 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-04 16:19:54 +0100 |
commit | ad148587dcf5244c2d2011dba339786c765c54c4 (patch) | |
tree | bdd914121cd326da2ed26679838878e3edffc841 /src/profiler.h | |
parent | 1145b05ea0bda87dc0827821385810eced08f774 (diff) | |
download | dragonfireclient-ad148587dcf5244c2d2011dba339786c765c54c4.tar.xz |
Make Lint Happy
Diffstat (limited to 'src/profiler.h')
-rw-r--r-- | src/profiler.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/profiler.h b/src/profiler.h index b4a0657f9..a68043d2a 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "threading/mutex_auto_lock.h" #include "util/timetaker.h" -#include "util/numeric.h" // paging() +#include "util/numeric.h" // paging() // Global profiler class Profiler; @@ -56,13 +56,11 @@ public: int print(std::ostream &o, u32 page = 1, u32 pagecount = 1); void getPage(GraphValues &o, u32 page, u32 pagecount); - void graphAdd(const std::string &id, float value) { MutexAutoLock lock(m_mutex); - std::map<std::string, float>::iterator i = - m_graphvalues.find(id); - if(i == m_graphvalues.end()) + std::map<std::string, float>::iterator i = m_graphvalues.find(id); + if (i == m_graphvalues.end()) m_graphvalues[id] = value; else i->second += value; @@ -74,7 +72,7 @@ public: m_graphvalues.clear(); } - void remove(const std::string& name) + void remove(const std::string &name) { MutexAutoLock lock(m_mutex); m_avgcounts.erase(name); @@ -89,7 +87,8 @@ private: u64 m_start_time; }; -enum ScopeProfilerType{ +enum ScopeProfilerType +{ SPT_ADD, SPT_AVG, SPT_GRAPH_ADD @@ -101,6 +100,7 @@ public: ScopeProfiler(Profiler *profiler, const std::string &name, ScopeProfilerType type = SPT_ADD); ~ScopeProfiler(); + private: Profiler *m_profiler = nullptr; std::string m_name; |