I declared a few functions only for legibility, and I want to check if the compiler is inlining them. According to this answer I figured I could mark them inline
and get a hint if they are not inlined, however, when I try to do so I get the following error:
[dcc32 Error] MyClass.pas(266): E1030 Invalid compiler directive: 'INLINE'
So I tried it with a simple function:
procedure TMyClass.Swap(var a, b : Integer); inline;
var
c : Integer;
begin
c := a;
a := b;
b := c;
end;
Alas, I get the same error. According to the docs the default is {$INLINE ON}
, so I assumed I only had to add inline;
. Nevertheless I tried declaring {$INLINE ON}
, to no avail. My Google-fu failed me, so here I am.
I am using Delphi 10.1 Berlin.