HTTP API: Allow binary downloads and headers (#8573)
[oweals/minetest.git] / src / util / timetaker.h
index c10f4f535d32f3c9e20e06e53632ad7b414a34c9..bc3d4a88dbd4562709a98ff86adc5b8523e105fb 100644 (file)
@@ -17,11 +17,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef UTIL_TIMETAKER_HEADER
-#define UTIL_TIMETAKER_HEADER
+#pragma once
 
-#include "../irrlichttypes.h"
-#include "../gettime.h"
+#include "irrlichttypes.h"
+#include "gettime.h"
 
 /*
        TimeTaker
@@ -30,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 class TimeTaker
 {
 public:
-       TimeTaker(const std::string &name, u64 *result=NULL,
+       TimeTaker(const std::string &name, u64 *result=nullptr,
                TimePrecision prec=PRECISION_MILLI);
 
        ~TimeTaker()
@@ -45,10 +44,7 @@ public:
 private:
        std::string m_name;
        u64 m_time1;
-       bool m_running;
+       bool m_running = true;
        TimePrecision m_precision;
-       u64 *m_result;
+       u64 *m_result = nullptr;
 };
-
-#endif
-