mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:09:23 +02:00
--amend
This commit is contained in:
parent
c7426a37ef
commit
d0fe59feda
@ -2117,18 +2117,18 @@ end;
|
|||||||
Procedure TValue.CastIntegerToInteger(out aRes : Boolean; out ADest: TValue; aDestType: PTypeInfo);
|
Procedure TValue.CastIntegerToInteger(out aRes : Boolean; out ADest: TValue; aDestType: PTypeInfo);
|
||||||
|
|
||||||
var
|
var
|
||||||
value: Integer;
|
Tmp : Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
with FData do
|
with FData do
|
||||||
case GetTypeData(FTypeInfo)^.OrdType of
|
case GetTypeData(FTypeInfo)^.OrdType of
|
||||||
otSByte: Value:=FAsSByte;
|
otSByte: Tmp:=FAsSByte;
|
||||||
otSWord: Value:=FAsSWord;
|
otSWord: Tmp:=FAsSWord;
|
||||||
otSLong: Value:=FAsSLong;
|
otSLong: Tmp:=FAsSLong;
|
||||||
else
|
else
|
||||||
value:=Integer(FAsULong);
|
Tmp:=Integer(FAsULong);
|
||||||
end;
|
end;
|
||||||
TValue.Make(@value,aDestType,aDest);
|
TValue.Make(@Tmp,aDestType,aDest);
|
||||||
aRes:=True;
|
aRes:=True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2215,17 +2215,17 @@ begin
|
|||||||
tkString:
|
tkString:
|
||||||
begin
|
begin
|
||||||
SS:=Tmp;
|
SS:=Tmp;
|
||||||
aDest:=TValue.Specialize From<ShortString>(SS);
|
TValue.Make(@SS,System.TypeInfo(ShortString),aDest);
|
||||||
end;
|
end;
|
||||||
tkWString:
|
tkWString:
|
||||||
begin
|
begin
|
||||||
WS:=Tmp;
|
WS:=Tmp;
|
||||||
aDest:=TValue.Specialize From<WideString>(WS);
|
TValue.Make(@WS,System.TypeInfo(WideString),aDest);
|
||||||
end;
|
end;
|
||||||
tkUString:
|
tkUString:
|
||||||
begin
|
begin
|
||||||
US:=Tmp;
|
US:=Tmp;
|
||||||
aDest:=TValue.Specialize From<UnicodeString>(US);
|
TValue.Make(@US,System.TypeInfo(UnicodeString),aDest);
|
||||||
end;
|
end;
|
||||||
tkLString:
|
tkLString:
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user