You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Don't inline certain functions for smaller binary size.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
This commit is contained in:
@@ -208,7 +208,13 @@ public:
|
||||
StringName() {}
|
||||
|
||||
static void assign_static_unique_class_name(StringName *ptr, const char *p_name);
|
||||
_FORCE_INLINE_ ~StringName() {
|
||||
|
||||
#ifdef SIZE_EXTRA
|
||||
_NO_INLINE_
|
||||
#else
|
||||
_FORCE_INLINE_
|
||||
#endif
|
||||
~StringName() {
|
||||
if (likely(configured) && _data) { //only free if configured
|
||||
unref();
|
||||
}
|
||||
|
||||
@@ -617,6 +617,9 @@ public:
|
||||
_FORCE_INLINE_ String(const String &p_str) { _cowdata._ref(p_str._cowdata); }
|
||||
_FORCE_INLINE_ String(String &&p_str) :
|
||||
_cowdata(std::move(p_str._cowdata)) {}
|
||||
#ifdef SIZE_EXTRA
|
||||
_NO_INLINE_ ~String() {}
|
||||
#endif
|
||||
_FORCE_INLINE_ void operator=(const String &p_str) { _cowdata._ref(p_str._cowdata); }
|
||||
_FORCE_INLINE_ void operator=(String &&p_str) { _cowdata = std::move(p_str._cowdata); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user