From 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 13:23:58 +0200 Subject: Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027. --- core/error_macros.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'core/error_macros.cpp') diff --git a/core/error_macros.cpp b/core/error_macros.cpp index 5de070844a..ff50c9786a 100644 --- a/core/error_macros.cpp +++ b/core/error_macros.cpp @@ -37,7 +37,6 @@ static ErrorHandlerList *error_handler_list = nullptr; void add_error_handler(ErrorHandlerList *p_handler) { - _global_lock(); p_handler->next = error_handler_list; error_handler_list = p_handler; @@ -45,16 +44,13 @@ void add_error_handler(ErrorHandlerList *p_handler) { } void remove_error_handler(ErrorHandlerList *p_handler) { - _global_lock(); ErrorHandlerList *prev = nullptr; ErrorHandlerList *l = error_handler_list; while (l) { - if (l == p_handler) { - if (prev) prev->next = l->next; else @@ -77,13 +73,11 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co } void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, const char *p_message, ErrorHandlerType p_type) { - OS::get_singleton()->print_error(p_function, p_file, p_line, p_error, p_message, (Logger::ErrorType)p_type); _global_lock(); ErrorHandlerList *l = error_handler_list; while (l) { - l->errfunc(l->userdata, p_function, p_file, p_line, p_error, p_message, p_type); l = l->next; } @@ -104,7 +98,6 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co } void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, const char *p_message, bool fatal) { - String fstr(fatal ? "FATAL: " : ""); String err(fstr + "Index " + p_index_str + " = " + itos(p_index) + " is out of bounds (" + p_size_str + " = " + itos(p_size) + ")."); _err_print_error(p_function, p_file, p_line, err.utf8().get_data(), p_message); -- cgit v1.2.3