From 0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 16:41:43 +0200 Subject: 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 --- core/io/logger.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/io/logger.cpp') diff --git a/core/io/logger.cpp b/core/io/logger.cpp index 23165b575e..ef78b1194e 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -67,10 +67,11 @@ void Logger::log_error(const char *p_function, const char *p_file, int p_line, c } const char *err_details; - if (p_rationale && *p_rationale) + if (p_rationale && *p_rationale) { err_details = p_rationale; - else + } else { err_details = p_code; + } logf_error("%s: %s\n", err_type, err_details); logf_error(" at: %s (%s:%i) - %s\n", p_function, p_file, p_line, p_code); -- cgit v1.2.3