mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-18 10:45:27 +02:00
Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
This commit is contained in:
@@ -42,7 +42,7 @@ extern Profiler *g_profiler;
|
||||
class Profiler
|
||||
{
|
||||
public:
|
||||
Profiler() {}
|
||||
Profiler() = default;
|
||||
|
||||
void add(const std::string &name, float value)
|
||||
{
|
||||
@@ -80,11 +80,8 @@ public:
|
||||
void clear()
|
||||
{
|
||||
MutexAutoLock lock(m_mutex);
|
||||
for(std::map<std::string, float>::iterator
|
||||
i = m_data.begin();
|
||||
i != m_data.end(); ++i)
|
||||
{
|
||||
i->second = 0;
|
||||
for (auto &it : m_data) {
|
||||
it.second = 0;
|
||||
}
|
||||
m_avgcounts.clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user