mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 19:12:24 -05:00
Add a macro to deprecate methods
This commit is contained in:
parent
44989bc957
commit
a2f26a96dc
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue