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
{ {
if (method.Ignore) return true; if (method.Ignore) return true;
if (@class.IsAbstract && method.IsConstructor) bool isEmptyCtor = method.IsConstructor && method.Parameters.Count == 0;
return true;
if (@class.IsValueType && method.IsDefaultConstructor) if (@class.IsValueType && isEmptyCtor)
return true; return true;
if (method.IsCopyConstructor || method.IsMoveConstructor) if (method.IsCopyConstructor || method.IsMoveConstructor)

Loading…
Cancel
Save