Browse Source

Only ignore constructors with zero parameters (which might not be the default).

pull/1/head
triton 13 years ago
parent
commit
6f71abc99f
  1. 5
      src/Generator/Generators/CLI/CLITextTemplate.cs

5
src/Generator/Generators/CLI/CLITextTemplate.cs

@ -91,10 +91,9 @@ namespace Cxxi.Generators.CLI @@ -91,10 +91,9 @@ namespace Cxxi.Generators.CLI
{
if (method.Ignore) return true;
if (@class.IsAbstract && method.IsConstructor)
return true;
bool isEmptyCtor = method.IsConstructor && method.Parameters.Count == 0;
if (@class.IsValueType && method.IsDefaultConstructor)
if (@class.IsValueType && isEmptyCtor)
return true;
if (method.IsCopyConstructor || method.IsMoveConstructor)

Loading…
Cancel
Save