You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Editor StringName and Viewport optimizations
* Added explicit return type to the SNAME macro. * Add some extra SNAME usages. * Change some ClassDB methods to use const StringName & arguments. * Cache the Window parent in Control because it's used in is_layout_rtl(), which is called often. * Only enable internal processing for viewports that need it. * Change CanvasItem::group to be a StringName because it's only used as that.
This commit is contained in:
@@ -167,6 +167,6 @@ bool operator!=(const char *p_name, const StringName &p_string_name);
|
||||
|
||||
StringName _scs_create(const char *p_chr, bool p_static = false);
|
||||
|
||||
#define SNAME(m_arg) ([]() { static StringName sname = _scs_create(m_arg, true); return sname; })()
|
||||
#define SNAME(m_arg) ([]() -> const StringName & { static StringName sname = _scs_create(m_arg, true); return sname; })()
|
||||
|
||||
#endif // STRING_NAME_H
|
||||
|
||||
Reference in New Issue
Block a user