Commit 0621fee
committed
Fixed coverity issue.
- Using std::move() makes the use of makeUniqueName() API more difficult.
- I think this implementation w/o moving is better.
_____________________________________________________________________________________________
*** CID 1635152: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/src/dbSta/src/dbEditHierarchy.cc: 400 in sta::dbEditHierarchy::hierarchicalConnect(odb::dbITerm *, odb::dbITerm *, const char *)()
394 std::string base_name = fmt::format(
395 "{}", db_network_->name(db_network_->dbToSta(source_pin_flat_net)));
396
397 // Decide a new unique net name to avoid collisions in the lowest common
398 // hierarchy
399 std::string unique_name
>>> CID 1635152: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "base_name" is passed-by-value as parameter to "makeUniqueName", when it could be moved instead.
400 = makeUniqueName(lowest_common_module, base_name);
401
402 // Create and connect dbModNet
403 source_db_mod_net
404 = dbModNet::create(lowest_common_module, unique_name.c_str());
405 top_dest_mod_iterm->connect(source_db_mod_net);
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>1 parent 5e4e7f0 commit 0621fee
2 files changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
600 | 600 | | |
601 | 601 | | |
| 602 | + | |
| 603 | + | |
602 | 604 | | |
603 | 605 | | |
604 | 606 | | |
605 | 607 | | |
606 | 608 | | |
607 | 609 | | |
608 | 610 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
| 611 | + | |
614 | 612 | | |
615 | 613 | | |
616 | 614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
0 commit comments