diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index f54544bcc..f1edf66ab 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -111,7 +111,7 @@ class Wrapped { 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 e729ba020..c5a8cc9fd 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;