1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

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
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 */