cleaned up handling of specifying multiple libraries at once#6593
Merged
chrchr-github merged 4 commits intocppcheck-opensource:mainfrom Jul 16, 2024
Merged
cleaned up handling of specifying multiple libraries at once#6593chrchr-github merged 4 commits intocppcheck-opensource:mainfrom
chrchr-github merged 4 commits intocppcheck-opensource:mainfrom
Conversation
Collaborator
Author
|
The GUI only passes a single file to the library loading. |
8f40a48 to
36cca15
Compare
| } | ||
| } | ||
|
|
||
| std::list<std::string> splitString(const std::string& str, char sep) |
Collaborator
There was a problem hiding this comment.
Let's bikeshed about this unimportant utility function, which seems quite inefficient.
We could use a very short regex version (which also doesn't produce empty strings), or this replacement:
std::list<std::string> splitString2(const std::string& str, char sep)
{
std::list<std::string> l;
std::string::size_type pos = 0;
for (;;) {
const std::string::size_type newPos = str.find(sep, pos);
l.push_back(str.substr(pos, newPos - pos));
if (newPos == std::string::npos) {
break;
}
pos = newPos + 1;
}
return l;
}
Collaborator
Author
There was a problem hiding this comment.
I already a simpler version locally (which might be identical to your version) which I will add in a follow-up PR which will also extend its usage. I wanted to keep this topical and not introduce any functional non-refactoring changes.
Collaborator
There was a problem hiding this comment.
I see.
There still is a merge conflict.
36cca15 to
0ce4f3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.