Merge pull request #1668 from dsnopek/print-verbose-conflict

Fix `print_verbose()` macro conflicting with `UtilityFunctions::print_verbose()`
pull/1671/head
David Snopek 2024-12-10 08:57:32 -06:00 committed by GitHub
commit 27ffd8c6be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 7 deletions

View File

@ -61,15 +61,13 @@ void print_line_rich(const Variant &p_variant, Args... p_args) {
UtilityFunctions::print_rich(p_variant, p_args...);
}
template <typename... Args>
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