mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 14:26:09 +00:00
fix formatting in all files
This commit is contained in:
@@ -101,8 +101,7 @@ public:
|
||||
// bytes sent on TCP
|
||||
std::atomic_size_t TcpSent = 0;
|
||||
|
||||
TimeType::time_point ConnectionTime{};
|
||||
|
||||
TimeType::time_point ConnectionTime {};
|
||||
|
||||
private:
|
||||
void InsertVehicle(int ID, const std::string& Data);
|
||||
|
||||
@@ -66,9 +66,9 @@ inline void _assert([[maybe_unused]] const char* file, [[maybe_unused]] const ch
|
||||
Sentry.LogAssert(#cond, _file_basename, _line, __func__); \
|
||||
} \
|
||||
} while (false)
|
||||
#define beammp_assert_not_reachable() \
|
||||
do { \
|
||||
#define beammp_assert_not_reachable() \
|
||||
do { \
|
||||
beammp_errorf("Assertion failed in '{}:{}': Unreachable code reached. This may result in a crash or undefined state of the program.", __func__, _line); \
|
||||
Sentry.LogAssert("code is unreachable", _file_basename, _line, __func__); \
|
||||
Sentry.LogAssert("code is unreachable", _file_basename, _line, __func__); \
|
||||
} while (false)
|
||||
#endif // DEBUG
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include "rapidjson/stringbuffer.h"
|
||||
#include "rapidjson/prettywriter.h"
|
||||
#include "rapidjson/document.h"
|
||||
#include "rapidjson/prettywriter.h"
|
||||
#include "rapidjson/stringbuffer.h"
|
||||
#include "rapidjson/writer.h"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* and write locks and read locks are mutually exclusive.
|
||||
*/
|
||||
|
||||
#include <shared_mutex>
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
|
||||
// Use ReadLock(m) and WriteLock(m) to lock it.
|
||||
using RWMutex = std::shared_mutex;
|
||||
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
{ "lua", [this](const auto& a, auto& b) { Autocomplete_Lua(a, b); } },
|
||||
{ "kick", [this](const auto& a, auto& b) { Autocomplete_Kick(a, b); } },
|
||||
{ "settings", [this](const auto& a, auto& b) { Autocomplete_Settings(a, b); } },
|
||||
};
|
||||
};
|
||||
|
||||
Commandline mCommandline;
|
||||
std::vector<std::string> mCachedLuaHistory;
|
||||
|
||||
@@ -7,4 +7,3 @@ namespace uuid {
|
||||
std::string GenerateUuid();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -112,11 +112,10 @@ int BeamMPServerMain(MainArguments Arguments) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Application::SetSubsystemStatus("Main", Application::Status::Starting);
|
||||
|
||||
SetupSignalHandlers();
|
||||
|
||||
|
||||
beammp_infof("BeamMP Server v{} ({})", Application::ServerVersionString(), BEAMMP_GIT_HASH);
|
||||
|
||||
TConfig Config(ConfigPath);
|
||||
@@ -130,17 +129,17 @@ int BeamMPServerMain(MainArguments Arguments) {
|
||||
Application::GracefullyShutdown();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Application::Console().Internal().set_prompt("> ");
|
||||
Application::Console().StartLoggingToFile();
|
||||
|
||||
|
||||
bool Shutdown = false;
|
||||
Application::RegisterShutdownHandler([&Shutdown] {
|
||||
beammp_info("If this takes too long, you can press Ctrl+C repeatedly to force a shutdown.");
|
||||
Application::SetSubsystemStatus("Main", Application::Status::ShuttingDown);
|
||||
Shutdown = true;
|
||||
});
|
||||
|
||||
|
||||
TServer Server(Arguments.List);
|
||||
auto LuaEngine = std::make_shared<TLuaEngine>();
|
||||
LuaEngine->SetServer(&Server);
|
||||
|
||||
Reference in New Issue
Block a user