Merge pull request #66 from geby/master
Removed undesirable typecast to WideString
This commit is contained in:
commit
96b415f190
@ -2908,8 +2908,8 @@ end;
|
||||
function TPSPascalCompiler.GetUnicodeString(Src: PIfRVariant; var s: Boolean): tbtunicodestring;
|
||||
begin
|
||||
case Src.FType.BaseType of
|
||||
btChar: Result := tbtWidestring(Src^.tchar);
|
||||
btString: Result := tbtWidestring(tbtstring(src^.tstring));
|
||||
btChar: Result := Src^.tchar;
|
||||
btString: Result := tbtstring(src^.tstring);
|
||||
btWideChar: Result := src^.twidechar;
|
||||
btWideString: Result := tbtWideString(src^.twidestring);
|
||||
btUnicodeString: result := tbtUnicodeString(src^.tunistring);
|
||||
@ -8204,7 +8204,7 @@ function TPSPascalCompiler.ProcessSub(BlockInfo: TPSBlockInfo): Boolean;
|
||||
{$IFNDEF PS_NOWIDESTRING}
|
||||
else if ((t1.BaseType = btString) or (t1.BaseType = btChar) or (t1.BaseType = btPchar)or (t1.BaseType = btWideString) or (t1.BaseType = btWideChar) or (t1.BaseType = btUnicodeString)) and
|
||||
((t2.BaseType = btString) or (t2.BaseType = btChar) or (t2.BaseType = btPchar) or (t2.BaseType = btWideString) or (t2.BaseType = btWideChar) or (t2.BaseType = btUnicodeString)) then
|
||||
Result := at2ut(FindBaseType(btWideString))
|
||||
Result := at2ut(FindBaseType(btUnicodeString))
|
||||
{$ENDIF}
|
||||
else
|
||||
Result := nil;
|
||||
|
@ -3585,10 +3585,10 @@ begin
|
||||
case aType.BaseType of
|
||||
btU8: Result := chr(tbtu8(src^));
|
||||
btU16: Result := widechar(src^);
|
||||
btChar: Result := tbtwidestring(tbtchar(Src^));
|
||||
btPchar: Result := tbtwidestring(pansichar(src^));
|
||||
btChar: Result := tbtchar(Src^);
|
||||
btPchar: Result := pansichar(src^);
|
||||
btWideChar: Result := tbtwidechar(Src^);
|
||||
btString: Result := tbtwidestring(tbtstring(src^));
|
||||
btString: Result := tbtstring(src^);
|
||||
btWideString: Result := tbtwidestring(src^);
|
||||
btVariant: Result := Variant(src^);
|
||||
btUnicodeString: result := tbtUnicodeString(src^);
|
||||
|
Loading…
Reference in New Issue
Block a user