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 in DomainVision #4

Open
PeterBowman opened this issue Oct 7, 2020 · 0 comments
Open

Const correctness in DomainVision #4

PeterBowman opened this issue Oct 7, 2020 · 0 comments

Comments

@PeterBowman
Copy link
Contributor

PeterBowman commented Oct 7, 2020

CommDepthImage::get_intrinsic should be const:

/**
* Get the intrinsic matrix of the color camera.
*/
inline const arma::mat get_intrinsic()
{
arma::mat m(4, 4);
for (size_t i = 0; i < 4; ++i)
{
for (size_t j = 0; j < 4; j++)
{
m(i, j) = idl_CommDepthImage.intrinsic_m[i*4 + j]; // _m is 1-dimension!
}
}
return m;
}

This lack of a const qualifier affects several other getters across the DomainVision namespace, as far as I can tell.

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

No branches or pull requests

1 participant