mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-09-07 03:43:29 +02:00
Adding optional to differentiate between empty sets and unset attributes
Signed-off-by: Ethan Mahintorabi <[email protected]>
This commit is contained in:
@@ -275,10 +275,13 @@ ConcreteCell::setAttribute(const std::string &key,
|
||||
attribute_map_.insert(key, value);
|
||||
}
|
||||
|
||||
std::string
|
||||
std::optional<std::string>
|
||||
ConcreteCell::getAttribute(const std::string &key) const
|
||||
{
|
||||
return attribute_map_.findKey(key);
|
||||
if (attribute_map_.hasKey(key)) {
|
||||
return attribute_map_.findKey(key);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
ConcretePort *
|
||||
|
||||
Reference in New Issue
Block a user