chore(clang): enforce clang format

This commit is contained in:
illyum 2024-09-20 11:07:07 -06:00
parent d285346662
commit df8f0866c0
2 changed files with 14 additions and 9 deletions

View File

@ -16,7 +16,7 @@ namespace ICEngine {
}
}
void ICEApplication::HandleFatalError(const std::string& message) {
void ICEApplication::HandleFatalError(const std::string &message) {
if (customHandler) {
customHandler(message);
} else {
@ -24,7 +24,7 @@ namespace ICEngine {
}
}
void ICEApplication::DefaultTerminationHandler(const std::string& message) {
void ICEApplication::DefaultTerminationHandler(const std::string &message) {
Log::GetCoreLogger()->Log(CRITICAL, __FILE__, __LINE__, __FUNCTION__, message);
std::exit(EXIT_FAILURE);
}
@ -33,7 +33,7 @@ namespace ICEngine {
Log::Init();
CORE_LOG_TRACE("Starting ICEngine");
ICEApplication* app = CreateICEApplication();
ICEApplication *app = CreateICEApplication();
if (app) {
CORE_LOG_TRACE("Starting User Application");
app->Run();

View File

@ -10,23 +10,28 @@
namespace ICEngine {
class ICEApplication {
public:
ICEApplication() {}
virtual ~ICEApplication() {}
ICEApplication() {
}
virtual ~ICEApplication() {
}
virtual void Run() = 0;
using TerminationHandler = std::function<void(const std::string&)>;
using TerminationHandler = std::function<void(const std::string &)>;
static void SetTerminationHandler(TerminationHandler handler);
static void HandleFatalError(const std::string& message);
static void HandleFatalError(const std::string &message);
private:
static TerminationHandler customHandler;
static void DefaultTerminationHandler(const std::string& message);
static void DefaultTerminationHandler(const std::string &message);
};
void StartApplication();
// Application-specific function that will be defined by the user
extern ICEApplication* CreateICEApplication();
extern ICEApplication *CreateICEApplication();
}