Commit c2e661f
authored
library.cpp: avoid useless cast (danmar#6970)
As suggested by the compiler:
```
/home/runner/work/eni.os.dev/eni.os.dev/cppcheck/lib/library.cpp: In member function ‘Library::Error Library::load(const char*, const char*, bool)’:
/home/runner/work/eni.os.dev/eni.os.dev/cppcheck/lib/library.cpp:205:61: warning: useless cast to type ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} [-Wuseless-cast]
205 | std::cout << "looking for library '" + std::string(fullfilename) + "'" << std::endl;
| ^~~~~~~~~~~~~~~~~~~~
```
It's already a _std::string_:
https://github.com/danmar/cppcheck/blob/main/lib/library.cpp#L2011 parent 4b60f81 commit c2e661f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
0 commit comments