chore(clang): enforce clang format
This commit is contained in:
parent
d285346662
commit
df8f0866c0
@ -16,7 +16,7 @@ namespace ICEngine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICEApplication::HandleFatalError(const std::string& message) {
|
void ICEApplication::HandleFatalError(const std::string &message) {
|
||||||
if (customHandler) {
|
if (customHandler) {
|
||||||
customHandler(message);
|
customHandler(message);
|
||||||
} else {
|
} 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);
|
Log::GetCoreLogger()->Log(CRITICAL, __FILE__, __LINE__, __FUNCTION__, message);
|
||||||
std::exit(EXIT_FAILURE);
|
std::exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ namespace ICEngine {
|
|||||||
Log::Init();
|
Log::Init();
|
||||||
CORE_LOG_TRACE("Starting ICEngine");
|
CORE_LOG_TRACE("Starting ICEngine");
|
||||||
|
|
||||||
ICEApplication* app = CreateICEApplication();
|
ICEApplication *app = CreateICEApplication();
|
||||||
if (app) {
|
if (app) {
|
||||||
CORE_LOG_TRACE("Starting User Application");
|
CORE_LOG_TRACE("Starting User Application");
|
||||||
app->Run();
|
app->Run();
|
||||||
|
@ -10,23 +10,28 @@
|
|||||||
namespace ICEngine {
|
namespace ICEngine {
|
||||||
class ICEApplication {
|
class ICEApplication {
|
||||||
public:
|
public:
|
||||||
ICEApplication() {}
|
ICEApplication() {
|
||||||
virtual ~ICEApplication() {}
|
}
|
||||||
|
|
||||||
|
virtual ~ICEApplication() {
|
||||||
|
}
|
||||||
|
|
||||||
virtual void Run() = 0;
|
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 SetTerminationHandler(TerminationHandler handler);
|
||||||
static void HandleFatalError(const std::string& message);
|
|
||||||
|
static void HandleFatalError(const std::string &message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static TerminationHandler customHandler;
|
static TerminationHandler customHandler;
|
||||||
static void DefaultTerminationHandler(const std::string& message);
|
|
||||||
|
static void DefaultTerminationHandler(const std::string &message);
|
||||||
};
|
};
|
||||||
|
|
||||||
void StartApplication();
|
void StartApplication();
|
||||||
|
|
||||||
// Application-specific function that will be defined by the user
|
// Application-specific function that will be defined by the user
|
||||||
extern ICEApplication* CreateICEApplication();
|
extern ICEApplication *CreateICEApplication();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user