Change Scope::GenerateTemporary() to return IntrusivePtr

This commit is contained in:
Jon Siwek 2020-05-27 16:51:25 -07:00
parent a13899c95e
commit 46e23b49fb
5 changed files with 24 additions and 22 deletions

View file

@ -72,9 +72,9 @@ IntrusivePtr<ID> Scope::Remove(std::string_view name)
return nullptr;
}
ID* Scope::GenerateTemporary(const char* name)
IntrusivePtr<ID> Scope::GenerateTemporary(const char* name)
{
return new ID(name, SCOPE_FUNCTION, false);
return make_intrusive<ID>(name, SCOPE_FUNCTION, false);
}
id_list* Scope::GetInits()