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

Remove explicitly-defined copy constructor/operator #328

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

mjcarroll
Copy link
Contributor

Cleans up warnings eg:

/home/mjcarroll/workspaces/ign_garden/src/ign-physics/tpe/lib/src/Shape.cc: In copy constructor ‘ignition::physics::tpelib::CapsuleShape::CapsuleShape(const ignition::physics::tpelib::CapsuleShape&)’:
/home/mjcarroll/workspaces/ign_garden/src/ign-physics/tpe/lib/src/Shape.cc:98:11: warning: implicitly-declared ‘ignition::physics::tpelib::CapsuleShape& ignition::physics::tpelib::CapsuleShape::operator=(const ignition::physics::tpelib::CapsuleShape&)’ is deprecated [-Wdeprecated-copy]
   98 |   *this = _other;
      |           ^~~~~~

Signed-off-by: Michael Carroll michael@openrobotics.org.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Mar 8, 2022
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

do we need to tick-tock this methods?

Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll mjcarroll changed the title Remove implicit-defined copy constructor/operator Remove explicitly-defined copy constructor/operator Mar 8, 2022
@mjcarroll
Copy link
Contributor Author

do we need to tick-tock this methods?

The corresponding methods should be created by the compiler in these cases.

Furthermore, I'm not entirely convinced that some of these were doing the right thing. The assignment operator is assuming that the RHS was of the same type, even when that wouldn't have been the same.

@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #328 (6608c12) into main (f198a7b) will increase coverage by 0.33%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #328      +/-   ##
==========================================
+ Coverage   75.73%   76.07%   +0.33%     
==========================================
  Files         129      129              
  Lines        5762     5726      -36     
==========================================
- Hits         4364     4356       -8     
+ Misses       1398     1370      -28     
Impacted Files Coverage Δ
tpe/lib/src/Shape.cc 98.18% <ø> (+18.72%) ⬆️
tpe/lib/src/Shape.hh 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f198a7b...6608c12. Read the comment docs.

@mjcarroll
Copy link
Contributor Author

Not a great sign from codecov, either 😅

+ Misses       1398     1370      -28     

@scpeters
Copy link
Member

there are pre-existing failures on main. I'll merge this now since it is an improvement

@scpeters scpeters merged commit 224a7e0 into main Mar 10, 2022
@scpeters scpeters deleted the remove_user_defined branch March 10, 2022 20:05
scpeters pushed a commit that referenced this pull request Mar 10, 2022
Backport from main.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
@scpeters scpeters mentioned this pull request Mar 28, 2022
6 tasks
azeey pushed a commit to azeey/gz-physics that referenced this pull request Mar 28, 2022
Signed-off-by: Michael Carroll <michael@openrobotics.org>
azeey pushed a commit to azeey/gz-physics that referenced this pull request Mar 30, 2022
Backport from main.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
scpeters pushed a commit that referenced this pull request Mar 30, 2022
Backport from main.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants