Commit 6a0442f
committed
odb: Avoid unnecessary copy in makeUniqueHierName
Build the unique hierarchy name directly from the sanitized base name.
Coverity reports COPY_INSTEAD_OF_MOVE because the no-suffix path copies a local string through the ternary expression. Start with the sanitized name and append the suffix only when present so neither path needs an extra copy/move temporary.
Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>1 parent 42457f2 commit 6a0442f
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
543 | | - | |
544 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
545 | 546 | | |
546 | 547 | | |
547 | 548 | | |
| |||
0 commit comments