You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Remove dependency of variant.h in print_string.h
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com> Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
This commit is contained in:
@@ -341,6 +341,14 @@ bool is_print_verbose_enabled() {
|
||||
return OS::get_singleton()->is_stdout_verbose();
|
||||
}
|
||||
|
||||
String stringify_variants(const Variant &p_var) {
|
||||
return p_var.operator String();
|
||||
String stringify_variants(const Span<Variant> &p_vars) {
|
||||
if (p_vars.is_empty()) {
|
||||
return String();
|
||||
}
|
||||
String result = String(p_vars[0]);
|
||||
for (const Variant &v : Span(p_vars.ptr() + 1, p_vars.size() - 1)) {
|
||||
result += ' ';
|
||||
result += v.operator String();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user