mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-12 16:09:04 +02:00
* Fix uninitialized result warnings
This commit is contained in:
parent
67dc093559
commit
d19e385f71
@ -1300,6 +1300,7 @@ end;
|
|||||||
function TDictionary<TKey, TValue>.ExtractPair(const Key: TKey): TMyPair;
|
function TDictionary<TKey, TValue>.ExtractPair(const Key: TKey): TMyPair;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Result:=Default(TMyPair);
|
||||||
if FMap.Has(Key) then
|
if FMap.Has(Key) then
|
||||||
begin
|
begin
|
||||||
Result.Create(Key,TValue(FMap.get(key)));
|
Result.Create(Key,TValue(FMap.get(key)));
|
||||||
@ -1419,6 +1420,7 @@ Var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
A:=TJSValueDynArray(FVal.Value);
|
A:=TJSValueDynArray(FVal.Value);
|
||||||
|
Result:=Default(TMyPair);
|
||||||
Result.Create(TKey(A[0]),TValue(A[1]));
|
Result.Create(TKey(A[0]),TValue(A[1]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user