Просмотр исходного кода

Merge pull request #1834 from dsnopek/wrapped-stringname-reference

Take reference in `Wrapped(const StringName &)`
David Snopek 3 недель назад
Родитель
Сommit
21b73421c6
2 измененных файлов с 2 добавлено и 2 удалено
  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;