fix formatting in all files

This commit is contained in:
Lion Kortlepel
2022-11-13 00:32:55 +01:00
parent 3f05b72cc2
commit b756ce3c3f
7 changed files with 12 additions and 15 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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"

View File

@@ -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;

View File

@@ -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;

View File

@@ -7,4 +7,3 @@ namespace uuid {
std::string GenerateUuid();
}

View File

@@ -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);