From fe725e4da4fac93eef8c21f38d5371103454d68d Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 4 Jun 2022 16:32:11 +0200 Subject: [PATCH] Don't add method default parameters inot cpp files. --- game/addons/gdc_converter/gdsparser.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game/addons/gdc_converter/gdsparser.gd b/game/addons/gdc_converter/gdsparser.gd index 38131db9..eae2c49b 100644 --- a/game/addons/gdc_converter/gdsparser.gd +++ b/game/addons/gdc_converter/gdsparser.gd @@ -357,7 +357,7 @@ class GDSScope: elif type == GDScopeType.GDSCOPE_TYPE_GENERIC: s += scope_data + " {" elif type == GDScopeType.GDSCOPE_TYPE_FUNC: - s += transform_method_to_cpp(owner_class_name) + " {" + s += transform_method_to_cpp(owner_class_name, false) + " {" elif type == GDScopeType.GDSCOPE_TYPE_CLASS: owner_class_name = scope_data + "::" @@ -723,7 +723,7 @@ class GDSScope: return var_final - func transform_method_to_cpp(name_prefix : String = "") -> String: + func transform_method_to_cpp(name_prefix : String = "", default_params : bool = true) -> String: if type != GDScopeType.GDSCOPE_TYPE_FUNC: return "" @@ -771,7 +771,7 @@ class GDSScope: func_final += p - if default_value_indx != -1: + if default_params && default_value_indx != -1: func_final += " = " + default_value if i + 1 < params.size():