@ -44,7 +44,7 @@ namespace CppSharp.Passes
private void CheckInvalidOperators ( Class @class )
private void CheckInvalidOperators ( Class @class )
{
{
foreach ( var @operator in @class . Operators )
foreach ( var @operator in @class . Operators . Where ( o = > ! o . Ignore ) )
{
{
if ( ! IsValidOperatorOverload ( @operator ) )
if ( ! IsValidOperatorOverload ( @operator ) )
{
{
@ -85,21 +85,17 @@ namespace CppSharp.Passes
private static void CreateIndexer ( Class @class , Method @operator )
private static void CreateIndexer ( Class @class , Method @operator )
{
{
if ( @class . Properties . All ( p = > p . Parameters . Count = = 0 | |
Property property = new Property
p . Parameters [ 0 ] . QualifiedType ! = @operator . Parameters [ 0 ] . QualifiedType ) )
{
{
Property property = new Property
Name = "Item" ,
{
QualifiedType = @operator . ReturnType ,
Name = "Item" ,
Access = @operator . Access ,
QualifiedType = @operator . ReturnType ,
Namespace = @class ,
Access = @operator . Access ,
GetMethod = @operator
Namespace = @class
} ;
} ;
property . Parameters . AddRange ( @operator . Parameters ) ;
property . GetMethod = @operator ;
@class . Properties . Add ( property ) ;
property . Parameters . AddRange ( @operator . Parameters ) ;
@operator . IsGenerated = false ;
@class . Properties . Add ( property ) ;
@operator . IsGenerated = false ;
}
}
}
static void HandleMissingOperatorOverloadPair ( Class @class , CXXOperatorKind op1 ,
static void HandleMissingOperatorOverloadPair ( Class @class , CXXOperatorKind op1 ,