Browse Source

Reduce nesting.

pull/742/head
Joao Matos 9 years ago
parent
commit
0c5729765e
  1. 28
      src/Generator/Passes/CheckAmbiguousFunctions.cs

28
src/Generator/Passes/CheckAmbiguousFunctions.cs

@ -105,22 +105,22 @@ namespace CppSharp.Passes @@ -105,22 +105,22 @@ namespace CppSharp.Passes
{
var method1 = function as Method;
var method2 = overload as Method;
if (method1 != null && method2 != null)
{
var sameParams = method1.Parameters.SequenceEqual(method2.Parameters,
ParameterTypeComparer.Instance);
if (method1 == null || method2 == null)
return false;
if (method1.IsConst && !method2.IsConst && sameParams)
{
method1.ExplicitlyIgnore();
return true;
}
var sameParams = method1.Parameters.SequenceEqual(method2.Parameters,
ParameterTypeComparer.Instance);
if (method2.IsConst && !method1.IsConst && sameParams)
{
method2.ExplicitlyIgnore();
return true;
}
if (method1.IsConst && !method2.IsConst && sameParams)
{
method1.ExplicitlyIgnore();
return true;
}
if (method2.IsConst && !method1.IsConst && sameParams)
{
method2.ExplicitlyIgnore();
return true;
}
return false;

Loading…
Cancel
Save