Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bit-pirate opened this issue Jan 6, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@bit-pirate
Copy link
Contributor

E.g.

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

Put it inside the class declaration or add inline.

@ghost ghost assigned bit-pirate Jan 6, 2014
@stonier
Copy link
Member

stonier commented Jan 14, 2014

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.

@bit-pirate bit-pirate changed the title pose_controller: make methods inline [yocs_diff_drive_controller] move function code from header to separate cpp file Apr 8, 2015
@bit-pirate
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants