diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2019-11-08 09:08:51 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-02-05 11:19:40 +0100 |
commit | 110f4f2dc5c27dd9b6cb9607d141389944f7c4cc (patch) | |
tree | 27108968ccc866e3341b4601bd9f82f27cce645e | |
parent | 6d69cd40bd43c744fd402507a02d42d328266dc8 (diff) |
Remove trailing semicolons from do..while wrappers.
- Remove trailing semicolons from ERR_FAIL_INDEX macros.
- Remove trailing semicolons from ERR_FAIL_UNSIGNED_INDEX macros.
- Remove trailing semicolons from CRASH_BAD_INDEX macros.
- Remove trailing semicolons from CRASH_BAD_UNSIGNED_INDEX macros.
-rw-r--r-- | core/error_macros.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/core/error_macros.h b/core/error_macros.h index 0fe3a5d796..664bff244f 100644 --- a/core/error_macros.h +++ b/core/error_macros.h @@ -121,7 +121,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ return; \ } \ - } while (0); + } while (0) #define ERR_FAIL_INDEX_MSG(m_index, m_size, m_msg) \ do { \ @@ -129,7 +129,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ return; \ } \ - } while (0); + } while (0) // The current function returns m_retval. @@ -139,7 +139,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ return m_retval; \ } \ - } while (0); + } while (0) #define ERR_FAIL_INDEX_V_MSG(m_index, m_size, m_retval, m_msg) \ do { \ @@ -147,7 +147,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ return m_retval; \ } \ - } while (0); + } while (0) // Only use CRASH macros if there is no sensible fallback, that is, the error is unrecoverable. @@ -157,7 +157,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), "", true); \ GENERATE_TRAP(); \ } \ - } while (0); + } while (0) #define CRASH_BAD_INDEX_MSG(m_index, m_size, m_msg) \ do { \ @@ -165,7 +165,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg), true); \ GENERATE_TRAP(); \ } \ - } while (0); + } while (0) // Unsigned integer index out of bounds error macros. // Ensures an unsigned integer index `m_index` is less than `m_size` @@ -178,7 +178,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ return; \ } \ - } while (0); + } while (0) #define ERR_FAIL_UNSIGNED_INDEX_MSG(m_index, m_size, m_msg) \ do { \ @@ -186,7 +186,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ return; \ } \ - } while (0); + } while (0) // The current function returns m_retval. @@ -196,7 +196,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ return m_retval; \ } \ - } while (0); + } while (0) #define ERR_FAIL_UNSIGNED_INDEX_V_MSG(m_index, m_size, m_retval, m_msg) \ do { \ @@ -204,7 +204,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ return m_retval; \ } \ - } while (0); + } while (0) // Only use CRASH macros if there is no sensible fallback, that is, the error is unrecoverable. @@ -214,7 +214,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), "", true); \ GENERATE_TRAP(); \ } \ - } while (0); + } while (0) #define CRASH_BAD_UNSIGNED_INDEX_MSG(m_index, m_size, m_msg) \ do { \ @@ -222,7 +222,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg), true); \ GENERATE_TRAP(); \ } \ - } while (0); + } while (0) // Null reference error macros. // Ensures a pointer `m_param` is not null. |