From 47d9cb9bed021662ec8f5b8f34db1ff4b507a68a Mon Sep 17 00:00:00 2001 From: David Snopek Date: Mon, 9 Dec 2024 11:33:57 -0600 Subject: [PATCH] Fix `print_verbose()` macro conflicting with `UtilityFunctions::print_verbose()` --- include/godot_cpp/core/print_string.hpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/include/godot_cpp/core/print_string.hpp b/include/godot_cpp/core/print_string.hpp index 3d70c796e..61f4330cf 100644 --- a/include/godot_cpp/core/print_string.hpp +++ b/include/godot_cpp/core/print_string.hpp @@ -61,15 +61,13 @@ void print_line_rich(const Variant &p_variant, Args... p_args) { UtilityFunctions::print_rich(p_variant, p_args...); } +template +void print_verbose(const Variant &p_variant, Args... p_args) { + UtilityFunctions::print_verbose(p_variant, p_args...); +} + bool is_print_verbose_enabled(); -// Checking the condition before evaluating the text to be printed avoids processing unless it actually has to be printed, saving some CPU usage. -#define print_verbose(m_variant) \ - { \ - if (is_print_verbose_enabled()) { \ - print_line(m_variant); \ - } \ - } } // namespace godot #endif // GODOT_PRINT_STRING_HPP