mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
reduce typeToNameMap lookups
This commit is contained in:
parent
a0d2d46c71
commit
ece1e579ac
@ -1553,12 +1553,13 @@ bool OICodeGen::enumerateTypesRecurse(drgn_type *type) {
|
||||
}
|
||||
|
||||
std::optional<std::string> OICodeGen::getNameForType(drgn_type *type) {
|
||||
if (typeToNameMap.find(type) == typeToNameMap.end()) {
|
||||
if (auto search = typeToNameMap.find(type); search != typeToNameMap.end()) {
|
||||
return search->second;
|
||||
}
|
||||
|
||||
LOG(ERROR) << "QOO7 Failed to find " << type;
|
||||
return std::nullopt;
|
||||
}
|
||||
return typeToNameMap[type];
|
||||
}
|
||||
|
||||
void OICodeGen::getFuncDefClassMembers(
|
||||
std::string &code, drgn_type *type,
|
||||
|
Loading…
Reference in New Issue
Block a user