|
@@ -1647,18 +1647,10 @@ end;
|
|
|
|
|
|
|
|
|
Procedure SetString (Out S : UnicodeString; Buf : PUnicodeChar; Len : SizeInt);
|
|
|
-var
|
|
|
- BufLen: SizeInt;
|
|
|
begin
|
|
|
SetLength(S,Len);
|
|
|
If (Buf<>Nil) and (Len>0) then
|
|
|
- begin
|
|
|
- BufLen := IndexWord(Buf^, Len+1, 0);
|
|
|
- If (BufLen>0) and (BufLen < Len) then
|
|
|
- Len := BufLen;
|
|
|
- Move (Buf[0],S[1],Len*sizeof(UnicodeChar));
|
|
|
- PUnicodeChar(Pointer(S)+Len*sizeof(UnicodeChar))^:=#0;
|
|
|
- end;
|
|
|
+ Move (Buf[0],S[1],Len*sizeof(UnicodeChar));
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -1668,13 +1660,7 @@ var
|
|
|
begin
|
|
|
SetLength(S,Len);
|
|
|
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,S,Len);
|
|
|
- //PUnicodeChar(Pointer(S)+Len*sizeof(UnicodeChar))^:=#0;
|
|
|
- end;
|
|
|
+ widestringmanager.Ansi2UnicodeMoveProc(Buf,S,Len);
|
|
|
end;
|
|
|
|
|
|
|