Browse Source

Skip generating some unique methods (ctors and dtors) for base classes when handling value types.

pull/329/head
triton 12 years ago
parent
commit
937bff4e2c
  1. 5
      src/Generator/Generators/CLI/CLISourcesTemplate.cs

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

@ -222,6 +222,11 @@ namespace CppSharp.Generators.CLI @@ -222,6 +222,11 @@ namespace CppSharp.Generators.CLI
if (@class.IsValueType && method.IsCopyConstructor)
continue;
// Do not generate constructors or destructors from base classes.
var declaringClass = method.Namespace as Class;
if (declaringClass != realOwner && (method.IsConstructor || method.IsDestructor))
continue;
GenerateMethod(method, realOwner);
}
}

Loading…
Cancel
Save