mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +02:00
Use correct class typecast for commit ba4cee279b
This commit is contained in:
parent
d38c24fee7
commit
1a19fe1f03
@ -959,12 +959,12 @@ implementation
|
||||
end;
|
||||
|
||||
{ convert n - n mod const into n div const*const }
|
||||
if (nodetype=subn) and (right.nodetype=modn) and is_constintnode(taddnode(right).right) and
|
||||
(left.isequal(taddnode(right).left)) and not(might_have_sideeffects(left)) then
|
||||
if (nodetype=subn) and (right.nodetype=modn) and is_constintnode(tmoddivnode(right).right) and
|
||||
(left.isequal(tmoddivnode(right).left)) and not(might_have_sideeffects(left)) then
|
||||
begin
|
||||
result:=caddnode.create_internal(muln,cmoddivnode.create(divn,left,taddnode(right).right.getcopy),taddnode(right).right);
|
||||
result:=caddnode.create_internal(muln,cmoddivnode.create(divn,left,tmoddivnode(right).right.getcopy),tmoddivnode(right).right);
|
||||
left:=nil;
|
||||
taddnode(right).right:=nil;
|
||||
tmoddivnode(right).right:=nil;
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user