Browse Source

Use CheckIgnoreMethod to check for ignored constructors instead of duplicating logic.

pull/1/head
triton 12 years ago
parent
commit
8941031c67
  1. 6
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

6
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -699,11 +699,7 @@ namespace Cxxi.Generators.CSharp
foreach (var ctor in @class.Constructors) foreach (var ctor in @class.Constructors)
{ {
if (ctor.IsCopyConstructor || ctor.IsMoveConstructor) if (CheckIgnoreMethod(@class, ctor))
continue;
// Default constructors are not supported in .NET value types.
if (ctor.Parameters.Count == 0 && @class.IsValueType)
continue; continue;
NewLineIfNeeded(); NewLineIfNeeded();

Loading…
Cancel
Save