Add Component::GetCanonicalNameVal to avoid extra StringVal allocations

This commit is contained in:
Tim Wojtulewicz 2022-05-10 13:31:06 -07:00
parent 22ab3bb0b3
commit a680c2faf0
5 changed files with 51 additions and 3 deletions

View file

@ -16,6 +16,7 @@ Component::Component(component::Type arg_type, const std::string& arg_name,
tag_subtype(tag_subtype)
{
canon_name = util::canonify_name(name);
canon_name_val = make_intrusive<StringVal>(canon_name);
}
void Component::Describe(ODesc* d) const