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

Const Correctness on Interfaces #76

Open
oscarmendezm opened this issue Jul 27, 2018 · 2 comments
Open

Const Correctness on Interfaces #76

oscarmendezm opened this issue Jul 27, 2018 · 2 comments

Comments

@oscarmendezm
Copy link

oscarmendezm commented Jul 27, 2018

In PointCloud.cu and PointCloud.h, should the function PointCloud::transform(...) be const?

Like so:

- void transform(const Matrix4f* transform, PointCloud* transformed_cloud);
+ void transform(const Matrix4f* transform, PointCloud* transformed_cloud) const;

@Squelsh
Copy link
Contributor

Squelsh commented Jul 28, 2018

In general you are right. The problem here is the m_transformation_dev variable which is a class variable that is used. This variable could be marked as mutable nevertheless so that the function could be const, as you suggest. Perhaps @cjue wants to change this in the next release?

I am sure, we could fine more candidates, which could be const, apart of a temporary device variable.

@cjue
Copy link
Contributor

cjue commented Aug 1, 2018

Thanks for the comments. I'll address PointCloud const correctness in an upcoming update.

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

No branches or pull requests

3 participants