TAChart: some tiny optimization
Original Reporter info from Mantis: Marcin Wiazowski
-
Reporter name:
Original Reporter info from Mantis: Marcin Wiazowski
- Reporter name:
Description:
I'm attaching a tiny patch, which changes some
"with FOwner as TCustomChartSource do"
to
"with TCustomChartSource(FOwner) do"
This is an optimization, because "TCustomChartSource(FOwner)" does not generate any code, while the "as" operator generates a call to "fpc_do_as" - which internally iterates through object's virtual method tables, to verify the inheritance.
The code can be changed safely, because FOwner's type is checked one line above.