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,11 +1553,12 @@ bool OICodeGen::enumerateTypesRecurse(drgn_type *type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::string> OICodeGen::getNameForType(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()) {
|
||||||
LOG(ERROR) << "QOO7 Failed to find " << type;
|
return search->second;
|
||||||
return std::nullopt;
|
|
||||||
}
|
}
|
||||||
return typeToNameMap[type];
|
|
||||||
|
LOG(ERROR) << "QOO7 Failed to find " << type;
|
||||||
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OICodeGen::getFuncDefClassMembers(
|
void OICodeGen::getFuncDefClassMembers(
|
||||||
|
Loading…
Reference in New Issue
Block a user