Merge pull request #16845 from NathanWarden/fix_vs_no_compile

[Mono] Fixed "expression did not evaluate to a constant" compiler error for Windows.
This commit is contained in:
Rémi Verschelde 2018-02-20 09:39:18 +01:00 committed by GitHub
commit c62a6942dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -230,11 +230,12 @@ String GDMonoMethod::get_signature_desc(bool p_namespaces) const {
} }
void GDMonoMethod::get_parameter_names(Vector<StringName> &names) const { void GDMonoMethod::get_parameter_names(Vector<StringName> &names) const {
const char *_names[params_count]; const char *_names = memnew_arr(char, params_count);
mono_method_get_param_names(mono_method, _names); mono_method_get_param_names(mono_method, &_names);
for (int i = 0; i < params_count; ++i) { for (int i = 0; i < params_count; ++i) {
names.push_back(StringName(_names[i])); names.push_back(StringName(&_names[i]));
} }
memdelete_arr(_names);
} }
void GDMonoMethod::get_parameter_types(Vector<ManagedType> &types) const { void GDMonoMethod::get_parameter_types(Vector<ManagedType> &types) const {