Skip to content

Commit

Permalink
Merge pull request #7033 from wmtan/MakeCtorPublic
Browse files Browse the repository at this point in the history
Make ctors public, and remove unused argument
  • Loading branch information
ktf committed Jan 2, 2015
2 parents 363b730 + e8ac2e1 commit d6b21ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions FWCore/Utilities/interface/TypeWithDict.h
Expand Up @@ -62,12 +62,14 @@ class TypeWithDict {
public:
TypeWithDict();
TypeWithDict(TypeWithDict const&);
explicit TypeWithDict(TClass* type);
explicit TypeWithDict(TEnum* type);
explicit TypeWithDict(std::type_info const&);
explicit TypeWithDict(TMethodArg* arg);
private:
explicit TypeWithDict(std::type_info const&, long property);
explicit TypeWithDict(TClass* type, long property = 0L);
explicit TypeWithDict(TEnum* type, std::string const& name, long property = 0L);
explicit TypeWithDict(TClass* type, long property);
explicit TypeWithDict(TEnum* type, long property);
explicit TypeWithDict(TMethodArg* arg, long property);
explicit TypeWithDict(TType* type, long property);
public:
Expand Down
12 changes: 9 additions & 3 deletions FWCore/Utilities/src/TypeWithDict.cc
Expand Up @@ -155,7 +155,7 @@ namespace edm {
// Handle enums
TEnum* theEnum = TEnum::GetEnum(name.c_str(), TEnum::kAutoload);
if(theEnum) {
return TypeWithDict(theEnum, name, property);
return TypeWithDict(theEnum, property);
}

// Handle built-ins
Expand Down Expand Up @@ -313,7 +313,10 @@ namespace edm {
}
}

TypeWithDict::TypeWithDict(TClass* cl, long property /*= 0L*/) :
TypeWithDict::TypeWithDict(TClass *cl) : TypeWithDict(cl, 0L) {
}

TypeWithDict::TypeWithDict(TClass* cl, long property) :
ti_(cl->GetTypeInfo()),
type_(nullptr),
class_(cl),
Expand All @@ -323,7 +326,10 @@ namespace edm {
property_(property) {
}

TypeWithDict::TypeWithDict(TEnum* enm, std::string const& name, long property /*= 0L*/) :
TypeWithDict::TypeWithDict(TEnum *enm) : TypeWithDict(enm, 0L) {
}

TypeWithDict::TypeWithDict(TEnum* enm, long property) :
ti_(&typeid(TypeWithDict::dummyType)),
type_(nullptr),
class_(nullptr),
Expand Down

0 comments on commit d6b21ef

Please sign in to comment.