diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-05-08 13:52:51 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-05-08 13:52:51 +0200 |
commit | 491a437df51192f76ac19cee1ba2001365697cc4 (patch) | |
tree | ada1019b3c7351a5ca6daf38273490a6a145a79c /core/string/print_string.h | |
parent | c9f81045be9760820a1bb4898f08d2ff9784d4b7 (diff) | |
parent | 273a6eeb66ed1ff2fcc1ee3a6eaae4eedf437875 (diff) | |
download | redot-engine-491a437df51192f76ac19cee1ba2001365697cc4.tar.gz |
Merge pull request #76540 from reduz/redo-remote-filesystem
Redo how the remote filesystem works
Diffstat (limited to 'core/string/print_string.h')
-rw-r--r-- | core/string/print_string.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/string/print_string.h b/core/string/print_string.h index 6496384b3f..7656e9bfa1 100644 --- a/core/string/print_string.h +++ b/core/string/print_string.h @@ -59,7 +59,15 @@ void remove_print_handler(const PrintHandlerList *p_handler); extern void __print_line(String p_string); extern void __print_line_rich(String p_string); extern void print_error(String p_string); -extern void print_verbose(String p_string); +extern bool is_print_verbose_enabled(); + +// This version avoids processing the text to be printed until it actually has to be printed, saving some CPU usage. +#define print_verbose(m_text) \ + { \ + if (is_print_verbose_enabled()) { \ + print_line(m_text); \ + } \ + } inline void print_line(Variant v) { __print_line(stringify_variants(v)); |