diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-04-18 09:10:25 -0300 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-04-18 14:27:26 +0200 |
commit | a2f26a96dc6a09eaba796c89f3bd17b9e73848a4 (patch) | |
tree | 3c56768f7d985887428b12d55bb42a117f17698d /core/error_macros.h | |
parent | 44989bc95754b40f4c00f10db43ed91f64a3e475 (diff) |
Add a macro to deprecate methods
Diffstat (limited to 'core/error_macros.h')
-rw-r--r-- | core/error_macros.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/error_macros.h b/core/error_macros.h index b8d0c7e0c3..168b2e06fe 100644 --- a/core/error_macros.h +++ b/core/error_macros.h @@ -311,4 +311,14 @@ extern bool _err_error_exists; _err_error_exists = false; \ } +#define WARN_DEPRECATED \ + { \ + static bool warning_shown=false;\ + if (!warning_shown) {\ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__,"This method has been deprecated and will be removed in the future", ERR_HANDLER_WARNING); \ + _err_error_exists = false; \ + warning_shown=true;\ + }\ + } + #endif |