Ignore:
Timestamp:
Jun 2, 2007, 7:04:19 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

StringのResizeを呼ぶコンストラクタでメモリ確保されない場合を排除、ほか微修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/TimeSpan.ab

    r265 r268  
    2020    End Sub
    2121
    22     Sub TimeSpan(ByRef ts As TimeSpan)
     22    Sub TimeSpan(ts As TimeSpan)
    2323        m_Time = ts.m_Time
    2424    End Sub
     
    2727    End Sub
    2828
    29     Function Operator+ (ByRef ts As TimeSpan) As TimeSpan
     29    Function Operator+ (ts As TimeSpan) As TimeSpan
    3030        Return FromTicks(m_Time + ts.m_Time)
    3131    End Function
    3232
    33     Function Operator- (ByRef ts As TimeSpan) As TimeSpan
     33    Function Operator- (ts As TimeSpan) As TimeSpan
    3434        Return FromTicks(m_Time - ts.m_Time)
    3535    End Function
     
    4343    End Function
    4444
    45     Function Operator== (ByRef ts As TimeSpan) As Boolean
     45    Function Operator== (ts As TimeSpan) As Boolean
    4646        Return Equals(ts)
    4747    End Function
    4848
    49     Function Operator<> (ByRef ts As TimeSpan) As Boolean
     49    Function Operator<> (ts As TimeSpan) As Boolean
    5050        Return Not Equals(ts)
    5151    End Function
    5252
    53     Function Operator> (ByRef ts As TimeSpan) As Boolean
     53    Function Operator> (ts As TimeSpan) As Boolean
    5454        If CompareTo(ts) > 0 Then
    5555            Return True
     
    5959    End Function
    6060
    61     Function Operator< (ByRef ts As TimeSpan) As Boolean
     61    Function Operator< (ts As TimeSpan) As Boolean
    6262        If CompareTo(ts) < 0 Then
    6363            Return True
     
    6767    End Function
    6868
    69     Function Operator>= (ByRef ts As TimeSpan) As Boolean
     69    Function Operator>= (ts As TimeSpan) As Boolean
    7070        If CompareTo(ts) => 0 Then
    7171            Return True
     
    7575    End Function
    7676
    77     Function Operator<= (ByRef ts As TimeSpan) As Boolean
     77    Function Operator<= (ts As TimeSpan) As Boolean
    7878        If CompareTo(ts) <= 0 Then
    7979            Return True
     
    128128    End Function
    129129
    130     Function Add(ByRef ts As TimeSpan) As TimeSpan
     130    Function Add(ts As TimeSpan) As TimeSpan
    131131        Return FromTicks(m_Time + ts.m_Time)
    132132    End Function
    133133
    134     Static Function Compare(ByRef ts1 As TimeSpan, ByRef ts2 As TimeSpan) As Long
     134    Static Function Compare(ts1 As TimeSpan, ts2 As TimeSpan) As Long
    135135        If ts1.m_Time < ts2.m_Time Then
    136136            Return -1
     
    142142    End Function
    143143
    144     Function CompareTo(ByRef ts As TimeSpan) As Long
     144    Function CompareTo(ts As TimeSpan) As Long
    145145        Return (m_Time - ts.m_Time) As Long
    146146    End Function
    147147
    148148    Function Duration() As TimeSpan
    149         Return FromTicks(Math.Abs(m_Time))
    150     End Function
    151 
    152     Function Equals(ByRef ts As TimeSpan) As Boolean
     149        Return FromTicks(System.Math.Abs(m_Time))
     150    End Function
     151
     152    Function Equals(ts As TimeSpan) As Boolean
    153153        Return Equals(This, ts)
    154154    End Function
    155155
    156     Static Function Equals(ByRef ts1 As TimeSpan, ByRef ts2 As TimeSpan) As Boolean
     156    Static Function Equals(ts1 As TimeSpan, ts2 As TimeSpan) As Boolean
    157157        If ts1.m_Time = ts2.m_Time Then
    158158            Return True
     
    195195    End Function
    196196
    197     Function Subtract(ByRef ts As TimeSpan) As TimeSpan
     197    Function Subtract(ts As TimeSpan) As TimeSpan
    198198        Return FromTicks(m_Time - ts.m_Time)
    199199    End Function
Note: See TracChangeset for help on using the changeset viewer.