From df01104ab781dc741b38ea4c77e3c3ca8abc2da9 Mon Sep 17 00:00:00 2001 From: triton Date: Wed, 21 Aug 2013 03:13:29 +0100 Subject: [PATCH] Fixed GetFunctionNativeIdentifier to work with function operators. --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 08690e4d..b39c7fef 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -2034,9 +2034,8 @@ namespace CppSharp.Generators.CSharp { var identifier = SafeIdentifier(function.Name);; - var method = function as Method; - if (method != null && method.IsOperator) - identifier = "Operator" + method.OperatorKind.ToString(); + if (function.IsOperator) + identifier = "Operator" + function.OperatorKind.ToString(); var overloads = function.Namespace.GetFunctionOverloads(function) .ToList();