Changeset 201


Ignore:
Timestamp:
Apr 3, 2007, 2:23:59 PM (18 years ago)
Author:
OverTaker
Message:

微修整

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/system/enum.sbp

    r173 r201  
    66        m_Value=value
    77    End Sub
     8   
    89    Sub ~EnumBase()
    910    End Sub
     
    1920    End Function
    2021
    21     Function Operator == (Value As Long) As Long
     22    Function Operator == (Value As Long) As Boolean
    2223        If m_Value = Value Then
    23             Return _System_TRUE
     24            Return True
    2425        Else
    25             Return _System_FALSE
     26            Return False
    2627        End If
    2728    End Function
    2829
    2930    Function Operator or (ByRef value As EnumBase) As EnumBase
    30         Dim returnValue As EnumBase
    31         returnValue.m_Value = m_Value Or value.m_Value
    32         Return returnValue
     31        Return New EnumBase(m_Value Or value.m_Value)
    3332    End Function
    3433
    35    
    3634    Function Operator and (ByRef value As EnumBase) As EnumBase
    37         Dim returnValue As EnumBase
    38         returnValue.m_Value = m_Value And value.m_Value
    39         Return returnValue
     35        Return New EnumBase(m_Value And value.m_Value)
    4036    End Function
    41    
     37
    4238    Function Operator not (ByRef value As EnumBase) As EnumBase
    43         Dim returnValue As EnumBase
    44         returnValue.m_Value = Not m_Value
    45         Return returnValue
     39        Return New EnumBase(Not m_Value)
    4640    End Function
    47    
     41
    4842    Function Operator xor (ByRef value As EnumBase) As EnumBase
    49         Dim returnValue As EnumBase
    50         returnValue.m_Value = m_Value Xor value.m_Value
    51         Return returnValue
     43        Return New EnumBase(m_Value Xor value.m_Value)
    5244    End Function
    5345End Class
Note: See TracChangeset for help on using the changeset viewer.