summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd
diff options
context:
space:
mode:
authorNathan Warden <nathan@nathanwarden.com>2018-02-20 00:24:52 -0500
committerNathan Warden <nathan@nathanwarden.com>2018-02-20 00:24:52 -0500
commit72fe70272d540afca691143d3a4f029176e37087 (patch)
tree056a860aa52a7bdbb4b6247ba4f174c04f1ab68e /modules/mono/mono_gd
parentad5ac052a447f5121e96f2c3964e14a880b397a7 (diff)
[Mono] Fixed "expression did not evaluate to a constant" compiler error for visual studio.
Diffstat (limited to 'modules/mono/mono_gd')
-rw-r--r--modules/mono/mono_gd/gd_mono_method.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/mono/mono_gd/gd_mono_method.cpp b/modules/mono/mono_gd/gd_mono_method.cpp
index df0985f6ac..69040a3df8 100644
--- a/modules/mono/mono_gd/gd_mono_method.cpp
+++ b/modules/mono/mono_gd/gd_mono_method.cpp
@@ -230,11 +230,12 @@ String GDMonoMethod::get_signature_desc(bool p_namespaces) const {
}
void GDMonoMethod::get_parameter_names(Vector<StringName> &names) const {
- const char *_names[params_count];
- mono_method_get_param_names(mono_method, _names);
+ const char *_names = memnew_arr(char, params_count);
+ mono_method_get_param_names(mono_method, &_names);
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 {