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

fix: Clang (13) warning in BoundingBox #1189

Merged
merged 2 commits into from
Mar 13, 2022

Conversation

paulgessinger
Copy link
Member

I noticed a warning:

[715/1093] Building CXX object Tests/UnitTests/Core/Geo...pezoidVolumeBounds.dir/TrapezoidVolumeBoundsTests.cpp.o
In file included from ../Tests/UnitTests/Core/Geometry/TrapezoidVolumeBoundsTests.cpp:13:
In file included from ../Core/include/Acts/Geometry/TrapezoidVolumeBounds.hpp:12:
In file included from ../Core/include/Acts/Geometry/Volume.hpp:15:
../Core/include/Acts/Utilities/BoundingBox.hpp:101:3: warning: definition of implicit copy assignment operator for 'AxisAlignedBoundingBox<Acts::Volume, double, 3>' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
  AxisAlignedBoundingBox(const self_t& other) = default;
  ^
../Tests/UnitTests/Core/Geometry/TrapezoidVolumeBoundsTests.cpp:40:6: note: in implicit copy assignment operator for 'Acts::AxisAlignedBoundingBox<Acts::Volume, double, 3>' first required here
  bb = tvb.boundingBox(&trf);
     ^
1 warning generated.

in a build with clang-13. This PR should remove this warning by
defaulting the copy assignment operator.

I noticed a warning:

```
[715/1093] Building CXX object Tests/UnitTests/Core/Geo...pezoidVolumeBounds.dir/TrapezoidVolumeBoundsTests.cpp.o
In file included from ../Tests/UnitTests/Core/Geometry/TrapezoidVolumeBoundsTests.cpp:13:
In file included from ../Core/include/Acts/Geometry/TrapezoidVolumeBounds.hpp:12:
In file included from ../Core/include/Acts/Geometry/Volume.hpp:15:
../Core/include/Acts/Utilities/BoundingBox.hpp:101:3: warning: definition of implicit copy assignment operator for 'AxisAlignedBoundingBox<Acts::Volume, double, 3>' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
  AxisAlignedBoundingBox(const self_t& other) = default;
  ^
../Tests/UnitTests/Core/Geometry/TrapezoidVolumeBoundsTests.cpp:40:6: note: in implicit copy assignment operator for 'Acts::AxisAlignedBoundingBox<Acts::Volume, double, 3>' first required here
  bb = tvb.boundingBox(&trf);
     ^
1 warning generated.
```

in a build with clang-13. This PR should remove this warning by
defaulting the copy assignment operator.
@paulgessinger paulgessinger added this to the next milestone Mar 10, 2022
@codecov
Copy link

codecov bot commented Mar 10, 2022

Codecov Report

Merging #1189 (21511a8) into main (3f3038c) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1189   +/-   ##
=======================================
  Coverage   47.80%   47.80%           
=======================================
  Files         360      360           
  Lines       18549    18550    +1     
  Branches     8756     8756           
=======================================
+ Hits         8867     8868    +1     
  Misses       3633     3633           
  Partials     6049     6049           
Impacted Files Coverage Δ
Core/include/Acts/Utilities/BoundingBox.hpp 100.00% <ø> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Member

@stephenswat stephenswat left a comment

Choose a reason for hiding this comment

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

Looks good, and harmless. 👍

@stephenswat stephenswat added Bug Something isn't working Component - Core Affects the Core module Impact - Minor Nuissance bug and/or affects only a single module automerge labels Mar 13, 2022
@kodiakhq kodiakhq bot merged commit b5f5efb into acts-project:main Mar 13, 2022
@paulgessinger paulgessinger modified the milestones: next, v18.0.0 Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Bug Something isn't working Component - Core Affects the Core module Impact - Minor Nuissance bug and/or affects only a single module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants