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

[common] Added resize with 2 arguments to PointCloud #4225

Merged
merged 2 commits into from
Jun 29, 2020

Conversation

kunaltyagi
Copy link
Member

@kunaltyagi kunaltyagi commented Jun 24, 2020

Cast addressed in separate PR

Required for #4217, #4218

@kunaltyagi kunaltyagi added changelog: enhancement Meta-information for changelog generation needs: code review Specify why not closed/merged yet module: common priority: gsoc Reason for prioritization labels Jun 24, 2020
* \param[in] value the value to initialize the new points with
*/
void
resize(index_t count, const PointT& value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not have the same parameter name/docstring of the base resize? I can understand not changing size_t to index_t for the old version to not break API, but the name change is unnecessary, I'd choose one of the two, and one of the two docstrings as well.

Copy link
Member Author

@kunaltyagi kunaltyagi Jun 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is copied from https://en.cppreference.com/w/cpp/container/vector/resize

Which one is better? I can make them the same

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd definitely opt for the standard's copy

Copy link
Contributor

@aPonza aPonza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (OOM on windows is irrelevant, std::size_t -> index_t is probably left for 1.12)

@kunaltyagi kunaltyagi merged commit d88a08e into PointCloudLibrary:master Jun 29, 2020
@kunaltyagi kunaltyagi deleted the pc.resize branch June 29, 2020 15:14
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: common needs: code review Specify why not closed/merged yet priority: gsoc Reason for prioritization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants