You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fix some DEFVALs to use the right type
- Use `StringName()` in DEFVAL for StringNames. - Use `Variant()` in DEFVAL for Variants.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
/**************************************************************************/
|
||||
|
||||
#include "object.h"
|
||||
#include "object.compat.inc"
|
||||
|
||||
#include "core/core_string_names.h"
|
||||
#include "core/extension/gdextension_manager.h"
|
||||
@@ -1472,6 +1473,7 @@ void Object::initialize_class() {
|
||||
}
|
||||
ClassDB::_add_class<Object>();
|
||||
_bind_methods();
|
||||
_bind_compatibility_methods();
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
@@ -1647,8 +1649,8 @@ void Object::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_message_translation", "enable"), &Object::set_message_translation);
|
||||
ClassDB::bind_method(D_METHOD("can_translate_messages"), &Object::can_translate_messages);
|
||||
ClassDB::bind_method(D_METHOD("tr", "message", "context"), &Object::tr, DEFVAL(""));
|
||||
ClassDB::bind_method(D_METHOD("tr_n", "message", "plural_message", "n", "context"), &Object::tr_n, DEFVAL(""));
|
||||
ClassDB::bind_method(D_METHOD("tr", "message", "context"), &Object::tr, DEFVAL(StringName()));
|
||||
ClassDB::bind_method(D_METHOD("tr_n", "message", "plural_message", "n", "context"), &Object::tr_n, DEFVAL(StringName()));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("is_queued_for_deletion"), &Object::is_queued_for_deletion);
|
||||
ClassDB::bind_method(D_METHOD("cancel_free"), &Object::cancel_free);
|
||||
|
||||
Reference in New Issue
Block a user