|
|
|
@ -100,9 +100,18 @@ namespace CppSharp.Passes |
|
|
|
if (!@operator.ReturnType.Qualifiers.IsConst && @operator.ReturnType.Type.IsAddress()) |
|
|
|
if (!@operator.ReturnType.Qualifiers.IsConst && @operator.ReturnType.Type.IsAddress()) |
|
|
|
property.SetMethod = @operator; |
|
|
|
property.SetMethod = @operator; |
|
|
|
|
|
|
|
|
|
|
|
// C++/CLI uses "default" as the indexer property name.
|
|
|
|
|
|
|
|
if (Driver.Options.IsCLIGenerator) |
|
|
|
if (Driver.Options.IsCLIGenerator) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// If we've a setter use the pointee as the type of the property.
|
|
|
|
|
|
|
|
var pointerType = property.Type as PointerType; |
|
|
|
|
|
|
|
if (pointerType != null && property.HasSetter) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
property.QualifiedType = new QualifiedType(pointerType.Pointee, property.QualifiedType.Qualifiers); |
|
|
|
|
|
|
|
property.GetMethod.ReturnType = property.QualifiedType; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// C++/CLI uses "default" as the indexer property name.
|
|
|
|
property.Name = "default"; |
|
|
|
property.Name = "default"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
property.Parameters.AddRange(@operator.Parameters); |
|
|
|
property.Parameters.AddRange(@operator.Parameters); |
|
|
|
|
|
|
|
|
|
|
|
|