Browse Source

Check if we're generating copy constructors before trying to use them.

pull/492/head
triton 10 years ago
parent
commit
74f9ab8a19
  1. 2
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

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

@ -1879,7 +1879,7 @@ namespace CppSharp.Generators.CSharp @@ -1879,7 +1879,7 @@ namespace CppSharp.Generators.CSharp
PushBlock(CSharpBlockKind.Method);
WriteLine("private static {0}.Internal* __CopyValue({0}.Internal native)", className);
WriteStartBraceIndent();
if (@class.HasNonTrivialCopyConstructor)
if (@class.HasNonTrivialCopyConstructor && Options.GenerateCopyConstructors)
{
// Find a valid copy constructor overload.
var copyCtorMethod = @class.Methods.FirstOrDefault(method =>

Loading…
Cancel
Save