Skip to content

Conversation

@jose-n9
Copy link

@jose-n9 jose-n9 commented Mar 12, 2025

In the original code, we pass an object as a parameter and modify it. In the new code, we return a const reference to an internal object. This change eliminates unnecessary data copying, provides more flexibility, and, most importantly, improves efficiency.

Original:
inline void getInliers (Indices &inliers) const { inliers = inliers_; }

Updated to return a const reference:
inline const Indices& getInliers() const { return inliers_; }

… return a const reference instead of modifiying parameters
@mvieth mvieth added changelog: enhancement Meta-information for changelog generation module: sample_consensus labels Mar 12, 2025
@mvieth
Copy link
Member

mvieth commented Mar 12, 2025

@jose-n9 Thanks for the pull request. However, please do not replace the old functions, just add the new functions. The old/existing functions are used in several places within PCL and likely also by other projects using PCL, so we cannot simply remove them.

@mvieth mvieth added the needs: author reply Specify why not closed/merged yet label Apr 4, 2025
@mvieth
Copy link
Member

mvieth commented Apr 25, 2025

Closing due to no reply, and checks are failing.

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: sample_consensus needs: author reply Specify why not closed/merged yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants