sofa icon indicating copy to clipboard operation
sofa copied to clipboard

[Helper] Deprecate error-prone resize and add emplace_back

Open alxbilger opened this issue 2 years ago • 2 comments

resize(Size s, bool) is error-prone because of a similar function in std::vector but with different behavior: resize(size_type count, const value_type& value). See https://en.cppreference.com/w/cpp/container/vector/resize


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

alxbilger avatar Oct 10 '22 08:10 alxbilger

[ci-build][with-all-tests]

alxbilger avatar Oct 10 '22 11:10 alxbilger

Looks good to me and, one more time a very meaningful change.

damienmarchal avatar Oct 12 '22 07:10 damienmarchal

[ci-build][with-all-tests]

alxbilger avatar Oct 18 '22 09:10 alxbilger