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

Have GeometricDet::bounds() return std::unique_ptr<Bounds> #2831

Merged
merged 1 commit into from Mar 13, 2014

Conversation

Dr15Jones
Copy link
Contributor

Before GeometricDet::bounds() returned a pointer to a new'ed Bounds.
However, returning a non-const pointer from a const function can make
the static analyzer think there is a threading problem. By switching
to returning a std::unique_ptr by value, the static analyzer
no longer complains and it makes callers of the routine take explicit
ownership of the pointer (which they should have done all along).
There were only minor changes to other code to deal with this change.

Before GeometricDet::bounds() returned a pointer to a new'ed Bounds.
However, returning a non-const pointer from a const function can make
the static analyzer think there is a threading problem. By switching
to returning a std::unique_ptr<Bounds> by value, the static analyzer
no longer complains and it makes callers of the routine take explicit
ownership of the pointer (which they should have done all along).
There were only minor changes to other code to deal with this change.
@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_1_X.

Have GeometricDet::bounds() return std::unique_ptr

It involves the following packages:

Geometry/TrackerGeometryBuilder
Geometry/TrackerNumberingBuilder

@civanch, @Dr15Jones, @ianna, @mdhildreth, @cmsbuild, @nclopezo, @Degano, @ktf can you please review it and eventually sign? Thanks.
@ghellwig this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@nclopezo, @ktf you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@cmsbuild
Copy link
Contributor

@Dr15Jones
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_1_X IBs unless changes (tests are also fine). @nclopezo, @ktf can you please take care of it?

nclopezo added a commit that referenced this pull request Mar 13, 2014
Geometry Tracker -- Have GeometricDet::bounds() return std::unique_ptr<Bounds>
@nclopezo nclopezo merged commit 4483043 into cms-sw:CMSSW_7_1_X Mar 13, 2014
@Dr15Jones Dr15Jones deleted the makeGeometricDetThreadSafe2 branch March 17, 2014 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants