Skip to content

Commit

Permalink
Delphi 10.2 Tokyo compatibility fix for TemplatePro (#808)
Browse files Browse the repository at this point in the history
* Delphi 10.2 Tokyo compatibility fix

* Delphi 10.2 Tokyo compatibility fix
  • Loading branch information
mark-lobanov authored Feb 5, 2025
1 parent dbe00bf commit 8f3bbdc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sources/TemplatePro.pas
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ TIfThenElseIndex = record
STR_END_OF_LAYOUT = 'end_of_layout';

type
{$IF not defined(RIOORBETTER)}
PValue = ^TValue;
{$ENDIF}

TFilterParameterType = (fptInteger, fptFloat, fptString, fptVariable);
TFilterParameterTypes = set of TFilterParameterType;

Expand Down Expand Up @@ -1958,6 +1962,7 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; var aParamet
lValue, lVarValue: TValue;
lExtendedValue: Extended;
lSQLTimestampOffset: TSQLTimeStampOffset;
lInt64: Int64;

procedure CheckParamType(const FunctionName: String; const FilterParameter: PFilterParameter; const Types: TFilterParameterTypes);
begin
Expand Down Expand Up @@ -2035,9 +2040,8 @@ function TTProCompiledTemplate.ExecuteFilter(aFunctionName: string; var aParamet
Result := False
else
begin
var
l := lValue.AsInt64;
Result := l mod aParameters[0].ParIntValue;
lInt64 := lValue.AsInt64;
Result := lInt64 mod aParameters[0].ParIntValue;
end;
end
else if SameText(aFunctionName, 'uppercase') then
Expand Down

0 comments on commit 8f3bbdc

Please sign in to comment.