Noise: Prevent unittest crash caused by division by zero
[oweals/minetest.git] / src / ban.h
index 5db7179defef48165f2be7e85cb314ed4ac5e5c8..35bf10abb8d5ed4015128cbdc9c517b979f6498d 100644 (file)
--- a/src/ban.h
+++ b/src/ban.h
@@ -21,9 +21,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define BAN_HEADER
 
 #include "util/string.h"
-#include "jthread/jthread.h"
-#include "jthread/jmutex.h"
+#include "threading/thread.h"
 #include "exceptions.h"
+#include <map>
+#include <string>
+#include <mutex>
 
 class BanManager
 {
@@ -39,12 +41,12 @@ public:
        void add(const std::string &ip, const std::string &name);
        void remove(const std::string &ip_or_name);
        bool isModified();
+
 private:
-       JMutex m_mutex;
-       std::string m_banfilepath;
+       std::mutex m_mutex;
+       std::string m_banfilepath = "";
        StringMap m_ips;
-       bool m_modified;
-
+       bool m_modified = false;
 };
 
 #endif