summaryrefslogtreecommitdiffstats
path: root/core/math
diff options
context:
space:
mode:
authorClay John <claynjohn@gmail.com>2023-05-05 09:56:48 -0700
committerGitHub <noreply@github.com>2023-05-05 09:56:48 -0700
commit610877e32651ecc10d1f530def7576b8d0429a28 (patch)
treead98207d1ff2a1ad052327b68987662f09e496bb /core/math
parent214a848e0fc5208b747f2f5ed6d0894084b7414e (diff)
parent6b84e258d20e007fd7c95ac2d4f9244bd93edc13 (diff)
downloadredot-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.inc6
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";