yujin_ocs icon indicating copy to clipboard operation
yujin_ocs copied to clipboard

[yocs_diff_drive_controller] move function code from header to separate cpp file

Open bit-pirate opened this issue 11 years ago • 2 comments

E.g.

void DiffDrivePoseController::spinOnce()
{ ... }

Put it inside the class declaration or add inline.

bit-pirate avatar Jan 06 '14 19:01 bit-pirate

Or in the cpp file - should always put function code in a cpp file unless it's either 1) a template function, or 2) you are expressly looking for an algorithm speedup by avoiding a function call (tradeoff cost - greatly increased program size).

I avoided doing this in the first version of the ecl when I was attracted by the idea of a header library we didn't need to compile (simpler to setup, simpler to install....lazy bastard). End result was that after a while our program sizes rapidly got so large they became unwieldy on embedded platforms (particularly for iclebo) and ecl2 was spawned.

stonier avatar Jan 14 '14 01:01 stonier

Will move the function code into a separate cpp file (issue title updated).

bit-pirate avatar Apr 08 '15 03:04 bit-pirate