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

Remove unneeded function #5969

Merged
merged 1 commit into from Oct 23, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions DataFormats/PatCandidates/src/UserData.cc
Expand Up @@ -4,8 +4,7 @@
#include "FWCore/Utilities/interface/EDMException.h"

void pat::UserData::checkDictionaries(const std::type_info &type) {
edm::TypeWithDict edmType(type);
if (!edmType.hasDictionary()) {
if (!edm::hasDictionary(type)) {
int status = 0;
char * demangled = abi::__cxa_demangle(type.name(), 0, 0, &status);
std::string typeName(status == 0 ? demangled : type.name());
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Services/src/InitRootHandlers.cc
Expand Up @@ -272,7 +272,7 @@ namespace edm {
setRefCoreStreamer();

// Load the library containing dictionaries for std:: classes, if not already loaded.
if (!TypeWithDict(typeid(std::vector<std::vector<unsigned int> >)).hasDictionary()) {
if (!hasDictionary(typeid(std::vector<std::vector<unsigned int> >))) {
edmplugin::PluginCapabilities::get()->load(dictionaryPlugInPrefix() + "std::vector<std::vector<unsigned int> >");
}

Expand Down
2 changes: 0 additions & 2 deletions FWCore/Utilities/interface/TypeWithDict.h
Expand Up @@ -60,9 +60,7 @@ class TypeWithDict {
explicit TypeWithDict(TEnum* type, std::string const& name, long property = 0L);
explicit TypeWithDict(TMethodArg* arg, long property = 0L);
explicit TypeWithDict(TType* type, long property = 0L);
//template<typename T> TypeWithDict() : TypeWithDict(typeid(T)) {}
explicit operator bool() const;
bool hasDictionary() const;
std::type_info const& typeInfo() const;
std::type_info const& id() const;
TClass* getClass() const;
Expand Down
12 changes: 0 additions & 12 deletions FWCore/Utilities/src/TypeWithDict.cc
Expand Up @@ -266,18 +266,6 @@ namespace edm {
return gInterpreter->Type_Bool(type_);
}

bool
TypeWithDict::hasDictionary() const {
if (*ti_ == typeid(void)) {
return true;
}
if (ti_->name()[1] == '\0') {
// returns true for built in types (single character mangled names)
return true;
}
return (TClassTable::GetDict(*ti_) != nullptr);
}

std::type_info const&
TypeWithDict::typeInfo() const {
return *ti_;
Expand Down