You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-04 17:04:49 +00:00
Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
This commit is contained in:
@@ -66,7 +66,7 @@ class ShaderGlobalsEditorInterface : public Object {
|
||||
GDCLASS(ShaderGlobalsEditorInterface, Object)
|
||||
|
||||
void _var_changed() {
|
||||
emit_signal("var_changed");
|
||||
emit_signal(SNAME("var_changed"));
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -425,7 +425,7 @@ void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) {
|
||||
}
|
||||
|
||||
void ShaderGlobalsEditor::_changed() {
|
||||
emit_signal("globals_changed");
|
||||
emit_signal(SNAME("globals_changed"));
|
||||
if (!interface->block_update) {
|
||||
interface->notify_property_list_changed();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user