Skip to content

Commit 0a278ca

Browse files
committed
fix performance-move-const-arg
Signed-off-by: Matt Liberty <[email protected]>
1 parent eb0d5a6 commit 0a278ca

File tree

5 files changed

+19
-21
lines changed

5 files changed

+19
-21
lines changed

src/drt/src/io/io.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,8 +1920,7 @@ void io::Parser::setCutLayerProperties(odb::dbTechLayer* layer,
19201920
auto spc = table[0][0];
19211921
con->setDefaultSpacing(spc);
19221922
con->setDefaultCenterToCenter(rule->isCenterToCenter(cutClass1, cutClass2));
1923-
con->setDefaultCenterAndEdge(
1924-
rule->isCenterAndEdge(std::move(cutClass1), std::move(cutClass2)));
1923+
con->setDefaultCenterAndEdge(rule->isCenterAndEdge(cutClass1, cutClass2));
19251924
if (rule->isLayerValid()) {
19261925
if (rule->isSameMetal()) {
19271926
tmpLayer->setLef58SameMetalInterCutSpcTblConstraint(con.get());

src/drt/src/rp/FlexRP_prep.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ void FlexRP::prep_cutSpcTbl()
360360
odb::dbTechLayerCutSpacingTableDefRule::SECOND)});
361361
con->setDefaultCenterToCenter(
362362
dbRule->isCenterToCenter(cutClass1, cutClass2));
363-
con->setDefaultCenterAndEdge(dbRule->isCenterAndEdge(
364-
std::move(cutClass1), std::move(cutClass2)));
363+
con->setDefaultCenterAndEdge(
364+
dbRule->isCenterAndEdge(cutClass1, cutClass2));
365365
}
366366
}
367367
}

src/drt/test/gcTest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,8 +1276,7 @@ TEST_P(CutSpcTblFixture, cut_spc_tbl)
12761276
table.push_back({{301, 301}, {301, 300}});
12771277
}
12781278

1279-
dbRule->setSpacingTable(
1280-
std::move(table), std::move(row_map), std::move(col_map));
1279+
dbRule->setSpacingTable(table, row_map, col_map);
12811280
makeLef58CutSpcTbl(3, dbRule);
12821281
frNet* n1 = makeNet("n1");
12831282

src/grt/src/cugr/src/robin_hood.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,14 +1774,14 @@ class Table
17741774
{
17751775
ROBIN_HOOD_TRACE(this)
17761776
if (o.mMask) {
1777-
mHashMultiplier = std::move(o.mHashMultiplier);
1777+
mHashMultiplier = o.mHashMultiplier;
17781778
mKeyVals = std::move(o.mKeyVals);
1779-
mInfo = std::move(o.mInfo);
1780-
mNumElements = std::move(o.mNumElements);
1781-
mMask = std::move(o.mMask);
1782-
mMaxNumElementsAllowed = std::move(o.mMaxNumElementsAllowed);
1783-
mInfoInc = std::move(o.mInfoInc);
1784-
mInfoHashShift = std::move(o.mInfoHashShift);
1779+
mInfo = o.mInfo;
1780+
mNumElements = o.mNumElements;
1781+
mMask = o.mMask;
1782+
mMaxNumElementsAllowed = o.mMaxNumElementsAllowed;
1783+
mInfoInc = o.mInfoInc;
1784+
mInfoHashShift = o.mInfoHashShift;
17851785
// set other's mask to 0 so its destructor won't do anything
17861786
o.init();
17871787
}
@@ -1794,14 +1794,14 @@ class Table
17941794
if (o.mMask) {
17951795
// only move stuff if the other map actually has some data
17961796
destroy();
1797-
mHashMultiplier = std::move(o.mHashMultiplier);
1797+
mHashMultiplier = o.mHashMultiplier;
17981798
mKeyVals = std::move(o.mKeyVals);
1799-
mInfo = std::move(o.mInfo);
1800-
mNumElements = std::move(o.mNumElements);
1801-
mMask = std::move(o.mMask);
1802-
mMaxNumElementsAllowed = std::move(o.mMaxNumElementsAllowed);
1803-
mInfoInc = std::move(o.mInfoInc);
1804-
mInfoHashShift = std::move(o.mInfoHashShift);
1799+
mInfo = o.mInfo;
1800+
mNumElements = o.mNumElements;
1801+
mMask = o.mMask;
1802+
mMaxNumElementsAllowed = o.mMaxNumElementsAllowed;
1803+
mInfoInc = o.mInfoInc;
1804+
mInfoHashShift = o.mInfoHashShift;
18051805
WHash::operator=(std::move(static_cast<WHash&>(o)));
18061806
WKeyEqual::operator=(std::move(static_cast<WKeyEqual&>(o)));
18071807
DataPool::operator=(std::move(static_cast<DataPool&>(o)));

src/odb/src/gdsin/gdsUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ std::map<std::pair<int16_t, int16_t>, std::string> getLayerMap(
119119
continue;
120120
}
121121
const boost::property_tree::ptree& layer = pairs.second;
122-
const std::string name = layer.get<std::string>("name", "");
122+
std::string name = layer.get<std::string>("name", "");
123123
const std::string source = layer.get<std::string>("source", "");
124124
const size_t at_pos = source.find('@');
125125
const size_t slash_pos = source.find('/');

0 commit comments

Comments
 (0)