Ignore:
Timestamp:
May 7, 2007, 4:22:52 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

#_fullcompileで検出されたエラーの修正(明らかに判るもののみ)

File:
1 edited

Legend:

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

    r227 r237  
    184184
    185185    Static Function CompareOrdinal(x As String, indexX As Long, y As String, indexY As Long, length As Long) As Long
    186         If x = Nothing Then
    187             If y = Nothing Then
     186        If Object.ReferenceEquals(x, Nothing) Then
     187            If Object.ReferenceEquals(y, Nothing) Then
    188188                Return 0
    189189            Else
    190190                Return -1
    191191            End If
    192         ElseIf y = Nothing Then
     192        ElseIf Object.ReferenceEquals(y, Nothing) Then
    193193            Return 1
    194194        End If
    195         Return _System_StrCmpN(VarPtr(x.Chars[indexX]), VarPtr(y.Chars[indexY]), length)
     195        Return _System_StrCmpN(VarPtr(x.Chars[indexX]), VarPtr(y.Chars[indexY]), length As SIZE_T)
    196196    End Function
    197197
     
    344344#ifdef __STRING_IS_NOT_UNICODE
    345345        With Concat
    346             Dim lenA = MultiByteToWideChar(CP_THREAD_ACP, 0, text, len, 0, 0, 0, 0)
     346            Dim lenA = WideCharToMultiByte(CP_THREAD_ACP, 0, text, len, 0, 0, 0, 0)
    347347            .AllocStringBuffer(m_Length + lenA)
    348348            memcpy(.Chars, This.Chars, m_Length)
    349             MultiByteToWideChar(CP_THREAD_ACP, 0, text, len, VarPtr(.Chars[m_Length]), lenA, 0, 0)
     349            WideCharToMultiByte(CP_THREAD_ACP, 0, text, len, VarPtr(.Chars[m_Length]), lenA, 0, 0)
    350350            .Chars[m_Length + lenA] = 0
    351351        End With
     
    473473        temp.AllocStringBuffer(length)
    474474        memcpy(temp.Chars, VarPtr(Chars[startIndex]), SizeOf (StrChar) * length)
    475         Chars[m_Length] = 0
     475        temp.Chars[m_Length] = 0
    476476        Return temp
    477477    End Function
     
    527527    End Function
    528528
    529     Const Function Replace(oldStr As *StrChar, newStr As *StrChar)
     529    Const Function Replace(oldStr As *StrChar, newStr As *StrChar) As String
    530530        If oldStr = 0 Then Debug 'Throw ArgumentNullException
    531531        If newStr = 0 Then newStr = ""
    532         Return ReplaceCore(oldStr, lstrlen(oldStr), newStr, lstrlen(newStr)) As String
     532        Return ReplaceCore(oldStr, lstrlen(oldStr), newStr, lstrlen(newStr))
    533533    End Function
    534534
Note: See TracChangeset for help on using the changeset viewer.