Ignore:
Timestamp:
Mar 13, 2007, 11:55:49 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

GetHashCodeを実装

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/Drawing/Size.ab

    r104 r166  
    4040    End Sub
    4141
    42     Function Operator + (sz As Size) As Size
     42    Function Operator +(sz As Size) As Size
    4343        Dim ret As Size(width + sz.width, height + sz.height)
    4444        Return ret
    4545    End Function
    4646
    47     Function Operator - (sz As Size) As Size
     47    Function Operator -(sz As Size) As Size
    4848        Dim ret As Size(width - sz.width, height - sz.height)
    4949        Return ret
     
    5555    End Function
    5656
    57     Function Operator == (sz As Size) As Boolean
     57    Function Operator ==(sz As Size) As Boolean
    5858        Return Equals(sz)
    5959    End Function
    6060
    61     Function Operator <> (sz As Size) As Boolean
     61    Function Operator <>(sz As Size) As Boolean
    6262        Return Not Equals(sz)
    6363    End Function
    6464
    65     Sub Operator = (ByRef sz As Size)
     65    Sub Operator =(ByRef sz As Size)
    6666        width = sz.width
    6767        height = sz.height
     
    7474            Equals = _System_FALSE
    7575        End If
     76    End Function
     77
     78    Override Function GetHashCode() As Long
     79        Return width Xor _System_BSwap(height)
    7680    End Function
    7781
Note: See TracChangeset for help on using the changeset viewer.