2
0
Эх сурвалжийг харах

rtl: manual merge some cpstrnew changes which was impossible to merge using regular tools due to the merge conflicts

git-svn-id: trunk@19132 -
paul 14 жил өмнө
parent
commit
fd5a15fda5

+ 1 - 7
rtl/inc/ustrings.inc

@@ -1759,13 +1759,7 @@ var
 begin
 begin
   SetLength(S,Len);
   SetLength(S,Len);
   If (Buf<>Nil) and (Len>0) then
   If (Buf<>Nil) and (Len>0) then
-    begin
-      BufLen := IndexByte(Buf^, Len+1, 0);
-      If (BufLen>0) and (BufLen < Len) then
-        Len := BufLen;
-      widestringmanager.Ansi2UnicodeMoveProc(Buf,DefaultSystemCodePage,S,Len);
-      //PUnicodeChar(Pointer(S)+Len*sizeof(UnicodeChar))^:=#0;
-    end;
+    widestringmanager.Ansi2UnicodeMoveProc(Buf,DefaultSystemCodePage,S,Len);
 end;
 end;
 
 
 
 

+ 1 - 9
rtl/inc/wstrings.inc

@@ -1026,18 +1026,10 @@ end;
 
 
 
 
 Procedure SetString (Out S : WideString; Buf : PChar; Len : SizeInt);
 Procedure SetString (Out S : WideString; Buf : PChar; Len : SizeInt);
-var
-  BufLen : SizeInt;
 begin
 begin
   SetLength(S,Len);
   SetLength(S,Len);
   If (Buf<>Nil) and (Len>0) then
   If (Buf<>Nil) and (Len>0) then
-    begin
-      BufLen := IndexByte(Buf^, Len+1, 0);
-      If (BufLen>0) and (BufLen < Len) then
-        Len := BufLen;
-      widestringmanager.Ansi2WideMoveProc(Buf,DefaultSystemCodePage,S,Len);
-      //PWideChar(Pointer(S)+Len*sizeof(WideChar))^:=#0;
-    end;
+    widestringmanager.Ansi2WideMoveProc(Buf,DefaultSystemCodePage,S,Len);
 end;
 end;