[fpc-pascal] Inline methods
Michael Van Canneyt
michael at freepascal.org
Wed May 18 12:44:47 CEST 2016
On Wed, 18 May 2016, LacaK wrote:
>>
> In my case it is not virtual method.
>
> But I forgot to mention, that it is method of generic object:
>
> generic T2DArray<T> = object
> ...
> public
> constructor Init(oobMode: TOutOfBoundsMode); overload;
> constructor Init(x,y: integer); overload;
> ...
> function Data(x,y: integer): PElement; overload; inline;
> end;
>
> So what can be a case, that method is not inlined, can it be track down or is
> there something which I can do to force inlining ?
Did you add {$INLINE ON} ?
If not, the compiler will ignore the ;inline; modifier.
Michael.
More information about the fpc-pascal
mailing list