Use StringName in pluginscript's set/get_prop and add_global_constant

This commit is contained in:
Emmanuel Leblond 2020-02-01 05:16:48 +01:00
parent 43f84445ba
commit af8905fdf3
No known key found for this signature in database
GPG key ID: C360860E645EFFC0
3 changed files with 6 additions and 10 deletions

View file

@ -187,8 +187,7 @@ void PluginScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int
}
void PluginScriptLanguage::add_global_constant(const StringName &p_variable, const Variant &p_value) {
const String variable = String(p_variable);
_desc.add_global_constant(_data, (godot_string *)&variable, (godot_variant *)&p_value);
_desc.add_global_constant(_data, (godot_string_name *)&p_variable, (godot_variant *)&p_value);
}
/* LOADER FUNCTIONS */