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

Minor improvements to TypeWithDict #6935

Merged
merged 1 commit into from Dec 15, 2014

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Dec 15, 2014

Some ROOT6 specific improvements to TypeWithDict.

  1. Define a new dummy type to be used as the type for an invalid TypeWithDict. "void" was being used, but this is no good since there can be a valid TypeWithDict for type "void".
    The type used here is a pointer to a pointer to an empty enum{}. This is an arbitrary type that will never be used otherwise.

  2. The typedef for the dummy type being used for the type_info field of a valid TypeWithDict with no type_info information was renamed from dummyEnum to dummyType, because in the future it will be used for types other than enums.

  3. To check if a valid TypeWithDict has valid type_info information, simply check that the type-info field is not dummyType. Remove the current unnecessarily complex check for this.

  4. (A fix) When constructing a TypeWithDict from a TType, explicitly check that the type is not an array or a pointer before creating a TClass for the type. I happened to notice that in some rare cases an array of classes was being treated as a class by TType. This will all be moot after TType is removed entirely, but, for now, the code should be correct.

  5. Add some statements useful in debugging, but comment them out. This makes it easy to add them when needed.

Please merge this request as soon as convenient.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wmtan for CMSSW_7_4_ROOT6_X.

Minor improvements to TypeWithDict

It involves the following packages:

FWCore/Utilities

@cmsbuild, @Dr15Jones, @ktf, @nclopezo can you please review it and eventually sign? Thanks.
@wddgit 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.

davidlt added a commit that referenced this pull request Dec 15, 2014
Minor improvements to TypeWithDict
@davidlt davidlt merged commit 3b2dacb into cms-sw:CMSSW_7_4_ROOT6_X Dec 15, 2014
@wmtan wmtan deleted the ImproveTypeWithDict branch December 15, 2014 19:13
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