diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index f54544bc..f1edf66a 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -111,7 +111,7 @@ protected: void _postinitialize(); - Wrapped(const StringName p_godot_class); + Wrapped(const StringName &p_godot_class); Wrapped(GodotObject *p_godot_object); virtual ~Wrapped() {} diff --git a/src/classes/wrapped.cpp b/src/classes/wrapped.cpp index e729ba02..c5a8cc9f 100644 --- a/src/classes/wrapped.cpp +++ b/src/classes/wrapped.cpp @@ -66,7 +66,7 @@ void Wrapped::_postinitialize() { } } -Wrapped::Wrapped(const StringName p_godot_class) { +Wrapped::Wrapped(const StringName &p_godot_class) { #ifdef HOT_RELOAD_ENABLED if (unlikely(Wrapped::_constructing_recreate_owner)) { _owner = Wrapped::_constructing_recreate_owner;