Forráskód Böngészése

* Fixed warnings.

git-svn-id: trunk@40188 -
yury 6 éve
szülő
commit
a19528efa1
2 módosított fájl, 7 hozzáadás és 3 törlés
  1. 1 1
      rtl/inc/generic.inc
  2. 6 2
      rtl/inc/ustrings.inc

+ 1 - 1
rtl/inc/generic.inc

@@ -29,7 +29,7 @@ function align(addr : Pointer;alignment : PtrUInt) : Pointer;{$ifdef SYSTEMINLIN
     tmp: PtrUInt;
   begin
     tmp:=PtrUInt(addr)+(alignment-1);
-    result:=pointer(tmp-(tmp mod alignment));
+    result:=pointer(ptruint(tmp-(tmp mod alignment)));
   end;
 {$endif}
 

+ 6 - 2
rtl/inc/ustrings.inc

@@ -1835,6 +1835,7 @@ end;
                 //One character US-ASCII, convert it to unicode
                 if IBYTE = 10 then
                   begin
+(*
                     If (PreChar<>13) and FALSE then
                       begin
                         //Expand to crlf, conform UTF-8.
@@ -1855,6 +1856,7 @@ end;
                           end;
                       end
                     else
+*)
                       begin
                         Dest[OutputUnicode]:=WideChar(IBYTE);
                         inc(OutputUnicode);
@@ -1978,6 +1980,7 @@ end;
                 //One character US-ASCII, convert it to unicode
                 if IBYTE = 10 then
                   begin
+(*
                     if (PreChar<>13) and FALSE then
                       begin
                         //Expand to crlf, conform UTF-8.
@@ -1987,6 +1990,7 @@ end;
                         PreChar:=10;
                       end
                     else
+*)
                       begin
                         inc(OutputUnicode);
                         PreChar:=IBYTE;
@@ -2242,7 +2246,7 @@ function UCS4StringToUnicodeString(const s : UCS4String) : UnicodeString;
   begin
     reslen:=0;
     for i:=0 to length(s)-2 do     { skip terminating #0 }
-      Inc(reslen,1+ord((s[i]>$ffff) and (s[i]<=$10ffff)));
+      Inc(reslen,1+ord((s[i]>$ffff) and (cardinal(s[i])<=$10ffff)));
     SetLength(result,reslen);
     UCS4Decode(s,pointer(result));
   end;
@@ -2255,7 +2259,7 @@ function UCS4StringToWideString(const s : UCS4String) : WideString;
   begin
     reslen:=0;
     for i:=0 to length(s)-2 do     { skip terminating #0 }
-      Inc(reslen,1+ord((s[i]>$ffff) and (s[i]<=$10ffff)));
+      Inc(reslen,1+ord((s[i]>$ffff) and (cardinal(s[i])<=$10ffff)));
     SetLength(result,reslen);
     UCS4Decode(s,pointer(result));
   end;