From 12ecce40864f8fc944a7aa3ac1758096674a440b Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Tue, 10 Dec 2019 01:34:50 +0100 Subject: [PATCH] Output: Don't show default values for required parameters in method signatures (CS1737) --- Il2CppInspector/Reflection/ParameterInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Il2CppInspector/Reflection/ParameterInfo.cs b/Il2CppInspector/Reflection/ParameterInfo.cs index cf14530..eba215e 100644 --- a/Il2CppInspector/Reflection/ParameterInfo.cs +++ b/Il2CppInspector/Reflection/ParameterInfo.cs @@ -108,7 +108,7 @@ namespace Il2CppInspector.Reflection (Position == 0 && DeclaringMethod.GetCustomAttributes("System.Runtime.CompilerServices.ExtensionAttribute").Any()? "this ":"") + $"{CustomAttributes.ToString(usingScope, inline: true, emitPointer: emitPointer, mustCompile: compileAttributes).Replace("[ParamArray]", "params")}" + $"{getCSharpSignatureString(usingScope)} {Name}" - + (HasDefaultValue ? " = " + DefaultValue.ToCSharpValue(ParameterType, usingScope) + + (IsOptional? " = " + DefaultValue.ToCSharpValue(ParameterType, usingScope) + (emitPointer && !(DefaultValue is null)? $" /* Metadata: 0x{(uint) DefaultValueMetadataAddress:X8} */" : "") : ""); public string GetReturnParameterString(Scope scope) => !IsRetval? null : getCSharpSignatureString(scope);