Skip to content

Commit fd6b54c

Browse files
authored
Merge pull request #128 from RyanTMontoya/master
Warning Fixes for Delphi 12
2 parents 8036c32 + 787bcbd commit fd6b54c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Quick.RTTI.Utils.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class function TRTTI.CreateInstance<T>(const Args: array of TValue): T;
8888
rmethod: TRttiMethod;
8989
rinstype: TRttiInstanceType;
9090
begin
91+
Result := Default(T);
9192
rtype := fCtx.GetType(TypeInfo(T));
9293
for rmethod in rtype.GetMethods do
9394
begin

Quick.Threads.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ procedure TThreadedQueueCS<T>.Clear;
685685
try
686686
for obj in FQueue do
687687
begin
688-
if TypeInfo(T) = TypeInfo(TObject) then PObject(@obj){$IFNDEF FPC}.DisposeOf;{$ELSE}.Free;{$ENDIF}
688+
if TypeInfo(T) = TypeInfo(TObject) then PObject(@obj){$ifndef FPC}{$IFDEF DELPHIRX12_UP}.Free{$ELSE}.DisposeOf{$ENDIF}{$ELSE}.Free{$ENDIF};
689689
end;
690690

691691
SetLength(FQueue,0);

0 commit comments

Comments
 (0)