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

Let setInputCloud of search methods indicate success or failure #5840

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

mvieth
Copy link
Member

@mvieth mvieth commented Oct 8, 2023

Instead of returning nothing, return true on success and false on failure. This is especially useful for organized neighbor to indicate whether the input cloud is suitable, but might also come in handy for other methods in the future. In filters, use the returned value to abort in case of failure. Fixes #5819

Instead of returning nothing, return true on success and false on failure.
This is especially useful for organized neighbor to indicate whether the input cloud is suitable, but might also come in handy for other methods in the future.
In filters, use the returned value to abort in case of failure.
Fixes PointCloudLibrary#5819
@themightyoarfish
Copy link
Contributor

looks reasonable to me.

@larshg
Copy link
Contributor

larshg commented Oct 10, 2023

Its public API right? So don't we need to keep the old version still around and deprecate it?
I guess if just change it to return a bool, couldn't people end up with a compiler warning, which if with errors on warnings ends up as an error?

Besides that, looks good 👍

@mvieth
Copy link
Member Author

mvieth commented Oct 10, 2023

What kind of compiler warning do you mean? As long as we don't mark this with [[nodiscard]] or similar, everyone should be free to ignore the returned value, no?

@larshg
Copy link
Contributor

larshg commented Oct 11, 2023

What kind of compiler warning do you mean? As long as we don't mark this with [[nodiscard]] or similar, everyone should be free to ignore the returned value, no?

Hmm, not sure there is any warnings about this - just more less thought there would be, but seems not.

👍

@mvieth
Copy link
Member Author

mvieth commented Oct 16, 2023

@larshg So is that an approval? 😄

@mvieth mvieth merged commit dc7aec5 into PointCloudLibrary:master Oct 16, 2023
13 checks passed
@mvieth mvieth deleted the search_setinputcloud_return branch October 16, 2023 12:43
@mvieth mvieth added the changelog: enhancement Meta-information for changelog generation label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: enhancement Meta-information for changelog generation module: filters module: search
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[filters] RadiusOulierRemoval uses OrganizedNeighbor on organized but unprojectable point clouds
3 participants