-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Conversation
* \param[in] value the value to initialize the new points with | ||
*/ | ||
void | ||
resize(index_t count, const PointT& value) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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)
Cast addressed in separate PR
Required for #4217, #4218