fix LibertyParser warnings

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
This commit is contained in:
dsengupta0628 2026-03-27 01:10:10 +00:00
parent 6771b77a5a
commit 616280e2f7
1 changed files with 5 additions and 5 deletions

View File

@ -79,7 +79,7 @@ LibertyParser::makeDefine(const LibertyAttrValueSeq *values,
const std::string &value_type_name = (*values)[2]->stringValue(); const std::string &value_type_name = (*values)[2]->stringValue();
LibertyAttrType value_type = attrValueType(value_type_name); LibertyAttrType value_type = attrValueType(value_type_name);
LibertyGroupType group_type = groupType(group_type_name); LibertyGroupType group_type = groupType(group_type_name);
define = new LibertyDefine(std::move(define_name), group_type, value_type, line); define = new LibertyDefine(define_name, group_type, value_type, line);
LibertyGroup *group = this->group(); LibertyGroup *group = this->group();
group->addDefine(define); group->addDefine(define);
for (auto value : *values) for (auto value : *values)
@ -168,7 +168,7 @@ LibertyParser::makeSimpleAttr(const std::string name,
int line) int line)
{ {
LibertySimpleAttr *attr = LibertySimpleAttr *attr =
new LibertySimpleAttr(std::move(name), std::move(*value), line); new LibertySimpleAttr(name, *value, line);
delete value; delete value;
LibertyGroup *group = this->group(); LibertyGroup *group = this->group();
group->addAttr(attr); group->addAttr(attr);
@ -189,7 +189,7 @@ LibertyParser::makeComplexAttr(const std::string name,
} }
else { else {
LibertyComplexAttr *attr = LibertyComplexAttr *attr =
new LibertyComplexAttr(std::move(name), std::move(*values), line); new LibertyComplexAttr(name, *values, line);
delete values; delete values;
LibertyGroup *group = this->group(); LibertyGroup *group = this->group();
group->addAttr(attr); group->addAttr(attr);
@ -414,7 +414,7 @@ LibertyGroup::findSubgroups(const std::string type) const
const LibertyGroup * const LibertyGroup *
LibertyGroup::findSubgroup(const std::string type) const LibertyGroup::findSubgroup(const std::string type) const
{ {
const LibertyGroupSeq &groups = findKeyValue(subgroup_map_, type); const LibertyGroupSeq groups = findKeyValue(subgroup_map_, type);
if (groups.size() >= 1) if (groups.size() >= 1)
return groups[0]; return groups[0];
else else
@ -436,7 +436,7 @@ LibertyGroup::findComplexAttrs(const std::string attr_name) const
const LibertyComplexAttr * const LibertyComplexAttr *
LibertyGroup::findComplexAttr(const std::string attr_name) const LibertyGroup::findComplexAttr(const std::string attr_name) const
{ {
const LibertyComplexAttrSeq &attrs = findKeyValue(complex_attr_map_, attr_name); const LibertyComplexAttrSeq attrs = findKeyValue(complex_attr_map_, attr_name);
if (attrs.size() >= 1) if (attrs.size() >= 1)
return attrs[0]; return attrs[0];
else else