mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
TypeGraph: Delete unused function in IdentifyContainers pass
It was accidentally copied from the TypeIdentifier pass.
This commit is contained in:
parent
9e2b48d713
commit
4fdf44b92d
@ -34,21 +34,6 @@ Pass IdentifyContainers::createPass(
|
||||
return Pass("IdentifyContainers", fn);
|
||||
}
|
||||
|
||||
bool IdentifyContainers::isAllocator(Type& t) {
|
||||
auto* c = dynamic_cast<Class*>(&t);
|
||||
if (!c)
|
||||
return false;
|
||||
|
||||
// Maybe add more checks for an allocator.
|
||||
// For now, just test for the presence of an "allocate" function
|
||||
for (const auto& func : c->functions) {
|
||||
if (func.name == "allocate") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
IdentifyContainers::IdentifyContainers(
|
||||
TypeGraph& typeGraph,
|
||||
const std::vector<std::unique_ptr<ContainerInfo>>& containers)
|
||||
|
@ -39,7 +39,6 @@ class IdentifyContainers : public RecursiveMutator {
|
||||
public:
|
||||
static Pass createPass(
|
||||
const std::vector<std::unique_ptr<ContainerInfo>>& containers);
|
||||
static bool isAllocator(Type& t);
|
||||
|
||||
IdentifyContainers(
|
||||
TypeGraph& typeGraph,
|
||||
|
Loading…
Reference in New Issue
Block a user