mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
This commit is contained in:
parent
07bc4e2f96
commit
0ee0fa42e6
683 changed files with 22803 additions and 12225 deletions
|
@ -63,8 +63,9 @@ static void handle_crash(int sig) {
|
|||
// Dump the backtrace to stderr with a message to the user
|
||||
fprintf(stderr, "%s: Program crashed with signal %d\n", __FUNCTION__, sig);
|
||||
|
||||
if (OS::get_singleton()->get_main_loop())
|
||||
if (OS::get_singleton()->get_main_loop()) {
|
||||
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_CRASH);
|
||||
}
|
||||
|
||||
fprintf(stderr, "Dumping the backtrace. %ls\n", msg.c_str());
|
||||
char **strings = backtrace_symbols(bt_buffer, size);
|
||||
|
@ -85,8 +86,9 @@ static void handle_crash(int sig) {
|
|||
snprintf(fname, 1024, "%s", demangled);
|
||||
}
|
||||
|
||||
if (demangled)
|
||||
if (demangled) {
|
||||
free(demangled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,8 +130,9 @@ CrashHandler::~CrashHandler() {
|
|||
}
|
||||
|
||||
void CrashHandler::disable() {
|
||||
if (disabled)
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CRASH_HANDLER_ENABLED
|
||||
signal(SIGSEGV, nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue