Skip to content

Commit 27ffd8c

Browse files
authored
Merge pull request #1668 from dsnopek/print-verbose-conflict
Fix `print_verbose()` macro conflicting with `UtilityFunctions::print_verbose()`
2 parents 97c16d3 + 47d9cb9 commit 27ffd8c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

include/godot_cpp/core/print_string.hpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,13 @@ void print_line_rich(const Variant &p_variant, Args... p_args) {
6161
UtilityFunctions::print_rich(p_variant, p_args...);
6262
}
6363

64+
template <typename... Args>
65+
void print_verbose(const Variant &p_variant, Args... p_args) {
66+
UtilityFunctions::print_verbose(p_variant, p_args...);
67+
}
68+
6469
bool is_print_verbose_enabled();
6570

66-
// Checking the condition before evaluating the text to be printed avoids processing unless it actually has to be printed, saving some CPU usage.
67-
#define print_verbose(m_variant) \
68-
{ \
69-
if (is_print_verbose_enabled()) { \
70-
print_line(m_variant); \
71-
} \
72-
}
7371
} // namespace godot
7472

7573
#endif // GODOT_PRINT_STRING_HPP

0 commit comments

Comments
 (0)