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:
@ -34,18 +34,18 @@
|
||||
|
||||
void EditorDebuggerPlugin::_breaked(bool p_really_did, bool p_can_debug) {
|
||||
if (p_really_did) {
|
||||
emit_signal("breaked", p_can_debug);
|
||||
emit_signal(SNAME("breaked"), p_can_debug);
|
||||
} else {
|
||||
emit_signal("continued");
|
||||
emit_signal(SNAME("continued"));
|
||||
}
|
||||
}
|
||||
|
||||
void EditorDebuggerPlugin::_started() {
|
||||
emit_signal("started");
|
||||
emit_signal(SNAME("started"));
|
||||
}
|
||||
|
||||
void EditorDebuggerPlugin::_stopped() {
|
||||
emit_signal("stopped");
|
||||
emit_signal(SNAME("stopped"));
|
||||
}
|
||||
|
||||
void EditorDebuggerPlugin::_bind_methods() {
|
||||
|
||||
Reference in New Issue
Block a user