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

Pass address of pointer, not value, again #6555

Merged
merged 1 commit into from Nov 21, 2014

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Nov 21, 2014

In (at least) four places in the ROOT 6 specific conditions code, the address of a pointer to an object needed to be passed to an ObjectWithDict constructor.
Unfortunately, the value of the pointer was passed instead (missing '&').
Two of these four were fixed in pull request #6521.
This pull request fixes the two cases of this that were missed in the prior pull request.
Editorial comment: I hate code that is not type safe.
This request also does some minor optimization by avoiding unnecessary ObjectWithDict::typeOf() calls, since the return value is already known.
Please merge this request as soon as convenient.

davidlt added a commit that referenced this pull request Nov 21, 2014
Pass address of pointer, not value, again
@davidlt davidlt merged commit 58e04eb into cms-sw:CMSSW_7_3_ROOT6_X Nov 21, 2014
@apfeiffer1
Copy link
Contributor

+1

On Fri, Nov 21, 2014 at 11:26 PM, wmtan notifications@github.com wrote:

In (at least) four places in the ROOT 6 specific conditions code, the
address of a pointer to an object needed to be passed to an ObjectWithDict
constructor.
Unfortunately, the value of the pointer was passed instead (missing '&').
Two of these four were fixed in pull request #6521
#6521.
This pull request fixes the two cases of this that were missed in the
prior pull request.
Editorial comment: I hate code that is not type safe.
This request also does some minor optimization by avoiding unnecessary
ObjectWithDict::typeOf() calls, since the return value is already known.

Please merge this request as soon as convenient.

You can merge this Pull Request by running

git pull https://github.com/wmtan/cmssw PassAddressOfPointer

Or view, comment on, or merge it at:

#6555
Commit Summary

  • Pass address of pointer, not value

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#6555.

Thanks,
cheers, andreas

@wmtan wmtan deleted the PassAddressOfPointer branch November 24, 2014 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants