Add comment to static StringBuilder

This commit is contained in:
Yufeng Ying 2024-11-05 23:03:50 +08:00
parent ac3ee5979a
commit 055cb6e832

View File

@ -512,6 +512,7 @@ void SceneTreeEditor::_queue_update_node_tooltip(Node *p_node, TreeItem *p_item)
}
void SceneTreeEditor::_update_node_tooltip(Node *p_node, TreeItem *p_item) {
// Use static StringBuilder to reuse inner buffer, avoiding memory allocation.
static StringBuilder tooltip;
tooltip.clear();
// Display the node name in all tooltips so that long node names can be previewed