Skip to content

fix #12642 - GUI: statistics is not correct#7600

Merged
danmar merged 1 commit into
cppcheck-opensource:mainfrom
clock999:wy_dev_12642
Jun 20, 2025
Merged

fix #12642 - GUI: statistics is not correct#7600
danmar merged 1 commit into
cppcheck-opensource:mainfrom
clock999:wy_dev_12642

Conversation

@clock999

@clock999 clock999 commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

The number displayed is one fewer than the actual number.

Comment thread gui/checkstatistics.cpp
Comment on lines 33 to -36
if (m.contains(key))
m[key]++;
else
m[key] = 0;

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.

Can't we just write:

    m[key]++;

?

@danmar danmar merged commit 0ce96b3 into cppcheck-opensource:main Jun 20, 2025
53 checks passed
@danmar

danmar commented Jun 20, 2025

Copy link
Copy Markdown
Collaborator

Thanks!

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