Skip to content

fixed #12221 - de-duplicate input source files (regression)#5740

Merged
chrchr-github merged 1 commit into
cppcheck-opensource:mainfrom
firewave:dedup-files
Dec 8, 2023
Merged

fixed #12221 - de-duplicate input source files (regression)#5740
chrchr-github merged 1 commit into
cppcheck-opensource:mainfrom
firewave:dedup-files

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Dec 8, 2023

No description provided.

Comment thread cli/cmdlineparser.cpp
}), filesResolved.end());
++it;
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the number of files can be so large that this O(N^2) approach would be too slow?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running a find on insert wouldn't be that much faster I reckon.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. And it's probably more difficult to use a sorted container or something while preserving the order.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it becomes a problem we can introduce a lookup cache.

@chrchr-github chrchr-github merged commit 7452e68 into cppcheck-opensource:main Dec 8, 2023
@firewave firewave deleted the dedup-files branch December 8, 2023 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants