Browse Source

Improve readability.

pull/742/head
Joao Matos 9 years ago
parent
commit
6de27837cd
  1. 12
      src/Generator/Passes/CheckAmbiguousFunctions.cs

12
src/Generator/Passes/CheckAmbiguousFunctions.cs

@ -131,17 +131,23 @@ namespace CppSharp.Passes @@ -131,17 +131,23 @@ namespace CppSharp.Passes
{
var functionParams = function.Parameters.Where(
p => p.Kind == ParameterKind.Regular).ToList();
// It's difficult to handle this case for more than one parameter
// It's difficult to handle this case for more than one parameter.
// For example, if we have:
//
// void f(float&, const int&);
// void f(const float&, int&);
// what should we do? Generate both? Generate the first one encountered?
//
// What should we do? Generate both? Generate the first one encountered?
// Generate the one with the least amount of "complex" parameters?
// So let's just start with the simplest case for the time being
// So let's just start with the simplest case for the time being.
if (functionParams.Count != 1)
return false;
var overloadParams = overload.Parameters.Where(
p => p.Kind == ParameterKind.Regular).ToList();
if (overloadParams.Count != 1)
return false;

Loading…
Cancel
Save