fix more stuff

This commit is contained in:
Lion Kortlepel
2021-02-17 01:06:02 +01:00
committed by Anonymous275
parent d360403c56
commit aec6ad9c14
8 changed files with 22 additions and 17 deletions

View File

@@ -1,10 +1,10 @@
#pragma once
#include <atomic>
#include <deque>
#include <functional>
#include <memory>
#include <mutex>
#include <deque>
#include "TConsole.h"
@@ -31,9 +31,6 @@ public:
int Port {};
std::string CustomIP;
[[nodiscard]] bool HasCustomIP() const { return !CustomIP.empty(); }
// new settings
std::string ResourceFolder;
};
using TShutdownHandler = std::function<void()>;
@@ -80,4 +77,3 @@ static inline void luaprint(const std::string& str) {
#define Biggest 30000
std::string Comp(std::string Data);
std::string DeComp(std::string Compressed);

View File

@@ -7,8 +7,11 @@ class IThreaded {
public:
IThreaded()
// invokes operator() on this object
: mThread(std::thread([this] { (*this)(); })) { }
: mThread() { }
virtual void Start() final {
mThread = std::thread([this] { (*this)(); });
}
virtual void operator()() = 0;
protected: