Commit 72e1aca
committed
instream: pass fileName by reference
... to eliminate unnecessary string copies
Suggested by Coverity:
```
Error: COPY_INSTEAD_OF_MOVE:
src/cslinker.cc:236:29: copy_constructor_call: "fnCwe" is passed-by-value as parameter to "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const &)", when it could be moved instead.
src/cslinker.cc:236:29: remediation: Use "std::move(""fnCwe"")" instead of "fnCwe".
Error: COPY_INSTEAD_OF_MOVE:
src/cslinker.cc:249:29: copy_constructor_call: "fnImp" is passed-by-value as parameter to "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const &)", when it could be moved instead.
src/cslinker.cc:249:29: remediation: Use "std::move(""fnImp"")" instead of "fnImp".
```
Related: csutils#2161 parent 703c2f5 commit 72e1aca
3 files changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
0 commit comments