diff options
| author | Clay John <claynjohn@gmail.com> | 2023-05-05 09:56:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-05 09:56:48 -0700 |
| commit | 610877e32651ecc10d1f530def7576b8d0429a28 (patch) | |
| tree | ad98207d1ff2a1ad052327b68987662f09e496bb /core/math | |
| parent | 214a848e0fc5208b747f2f5ed6d0894084b7414e (diff) | |
| parent | 6b84e258d20e007fd7c95ac2d4f9244bd93edc13 (diff) | |
| download | redot-engine-610877e32651ecc10d1f530def7576b8d0429a28.tar.gz | |
Merge pull request #72288 from MewPurPur/use-string-repeat
Use `String.repeat()` to optimize several String methods
Diffstat (limited to 'core/math')
| -rw-r--r-- | core/math/bvh_debug.inc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/math/bvh_debug.inc b/core/math/bvh_debug.inc index 2e519ceb3d..1964f2fa83 100644 --- a/core/math/bvh_debug.inc +++ b/core/math/bvh_debug.inc @@ -30,11 +30,7 @@ String _debug_aabb_to_string(const BVHABB_CLASS &aabb) const { void _debug_recursive_print_tree_node(uint32_t p_node_id, int depth = 0) const { const TNode &tnode = _nodes[p_node_id]; - String sz = ""; - for (int n = 0; n < depth; n++) { - sz += "\t"; - } - sz += itos(p_node_id); + String sz = String("\t").repeat(depth) + itos(p_node_id); if (tnode.is_leaf()) { sz += " L"; |
