Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize inserts in std containers using reserve #2000

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

GermanAizek
Copy link
Contributor

@sdottaka hi.
I think you will need such optimizations that affect Debug and Release build.

else
{
list.reserve(m_nGroups * m_nBuffers);

Check failure

Code scanning / CodeQL

Multiplication result converted to larger type

Multiplication result may overflow 'int' before it is converted to 'size_type'.
@sdottaka sdottaka merged commit f1977db into WinMerge:master Aug 28, 2023
@sdottaka sdottaka added this to the v2.16.33 milestone Aug 28, 2023
@sdottaka
Copy link
Member

Thank you!
I'm concerned about the reserve() argument in the CreateVirtualLineToRealLineMap3way() function in the MergeDocDiffSync.cpp file, which I may fix later.

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