Browse Source

Take reference in `Wrapped(const StringName &)`

David Snopek 3 weeks ago
parent
commit
b192b880d3
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/godot_cpp/classes/wrapped.hpp
  2. 1 1
      src/classes/wrapped.cpp

+ 1 - 1
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() {}
 

+ 1 - 1
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;