Fix #14533, #14536 FN stlcstrConcat, stlcstrAssignment, stlcstrConstructor#8261
Fix #14533, #14536 FN stlcstrConcat, stlcstrAssignment, stlcstrConstructor#8261chrchr-github wants to merge 11 commits intodanmar:mainfrom
Conversation
| { | ||
| const QString filter(tr("Library files (*.cfg)")); | ||
| const QString path = Path::getPathFromFilename(mFileName.toStdString()).c_str(); | ||
| const QString path = QString::fromStdString(Path::getPathFromFilename(mFileName.toStdString())); |
There was a problem hiding this comment.
We have stdStringLike strings in qt.cfg, sfml.cfg and wxwidgets.cfg, which all have conversion functions to/from std::string. So it should be OK to warn if the types don't match. I guess converting e.g. a QString to a wxString is pretty rare.
There was a problem hiding this comment.
I assume you fixed some selfcheck warning.
What is the reason to warn here? is it only about style? what does the warning say?
There was a problem hiding this comment.
It was a stlcstrAssignment warning: https://github.com/danmar/cppcheck/actions/runs/22435680598/job/64964773966
There was a problem hiding this comment.
We have
stdStringLikestrings in qt.cfg, sfml.cfg and wxwidgets.cfg, which all have conversion functions to/fromstd::string. So it should be OK to warn if the types don't match. I guess converting e.g. aQStringto awxStringis pretty rare.
In addition, only wxString has c_str/data().
|



No description provided.