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/DateTime.ab

    r263 r268  
    5252
    5353    'Copy Constructor
    54     Sub DateTime(ByRef dateTime As DateTime)
     54    Sub DateTime(dateTime As DateTime)
    5555        This.m_Date = dateTime.m_Date
    5656    End Sub
     
    5959    End Sub
    6060
    61     Function Operator + (ByRef value As TimeSpan) As DateTime
     61    Function Operator + (value As TimeSpan) As DateTime
    6262        Return New DateTime(Ticks + value.Ticks)
    6363    End Function
    6464
    65     Function Operator - (ByRef value As DateTime) As TimeSpan
     65    Function Operator - (value As DateTime) As TimeSpan
    6666        Return TimeSpan.FromTicks(Ticks - value.Ticks)
    6767    End Function
    6868
    69     Function Operator - (ByRef value As TimeSpan) As DateTime
     69    Function Operator - (value As TimeSpan) As DateTime
    7070        Return New DateTime(Ticks - value.Ticks)
    7171    End Function
    7272
    73     Function Operator == (ByRef value As DateTime) As Boolean
     73    Function Operator == (value As DateTime) As Boolean
    7474        Return Equals(value)
    7575    End Function
    7676
    77     Function Operator <> (ByRef value As DateTime) As Boolean
     77    Function Operator <> (value As DateTime) As Boolean
    7878        Return Not Equals(value)
    7979    End Function
    8080
    81     Function Operator > (ByRef value As DateTime) As Boolean
     81    Function Operator > (value As DateTime) As Boolean
    8282        If DateTime.Compare(This, value) > 0 Then
    8383            Return True
     
    8787    End Function
    8888
    89     Function Operator < (ByRef value As DateTime) As Boolean
     89    Function Operator < (value As DateTime) As Boolean
    9090        If DateTime.Compare(This, value) < 0 Then
    9191            Return True
     
    9595    End Function
    9696
    97     Function Operator >= (ByRef value As DateTime) As Boolean
     97    Function Operator >= (value As DateTime) As Boolean
    9898        If DateTime.Compare(This, value) => 0 Then
    9999            Return True
     
    103103    End Function
    104104
    105     Function Operator <= (ByRef value As DateTime) As Boolean
     105    Function Operator <= (value As DateTime) As Boolean
    106106        If DateTime.Compare(This, value) <= 0 Then
    107107            Return True
     
    191191       
    192192    'Public Methods
    193     Static Function Compare(ByRef t1 As DateTime, ByRef t2 As DateTime) As Int64
     193    Static Function Compare(t1 As DateTime, t2 As DateTime) As Int64
    194194        Return t1.Ticks - t2.Ticks
    195195    End Function
    196196
    197     Function Equals(ByRef value As DateTime) As Boolean
     197    Function Equals(value As DateTime) As Boolean
    198198        If value.m_Date = m_Date Then
    199199            Return True
     
    203203    End Function
    204204
    205     Static Function Equals(ByRef t1 As DateTime, ByRef t2 As DateTime) As Boolean
     205    Static Function Equals(t1 As DateTime, t2 As DateTime) As Boolean
    206206        If t1.m_Date = t2.m_Date Then
    207207            Return True
     
    215215    End Function
    216216
    217     Function Add(ByRef value As TimeSpan) As DateTime
     217    Function Add(value As TimeSpan) As DateTime
    218218        Return This + value
    219219    End Function
     
    259259    End Function
    260260
    261     Function Subtract(ByRef value As DateTime) As TimeSpan
    262         Return New DateTime(This - value)
    263     End Function
    264 
    265     Function Subtract(ByRef value As TimeSpan) As DateTime
    266         Return New DateTime(This - value)
     261    Function Subtract(value As DateTime) As TimeSpan
     262        Return This - value
     263    End Function
     264
     265    Function Subtract(value As TimeSpan) As DateTime
     266        Return This - value
    267267    End Function
    268268
Note: See TracChangeset for help on using the changeset viewer.