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

osd/OSD.h: remove unneeded line #8980

Merged
merged 1 commit into from Jul 6, 2016
Merged

Conversation

stiopaa1
Copy link
Contributor

@stiopaa1 stiopaa1 commented May 6, 2016

We don't need to create a key with value 0 here.
It is created in statement:
pgid_tracker[pgid]++
if it doesnt exist.

Signed-off-by: Michal Jarzabek stiopa@gmail.com

We don't need to create a key with value 0 here.
It is created in statement:
pgid_tracker[pgid]++
if it doesnt exist.

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
@xiexingguo
Copy link
Member

lgtm

@tchaikov
Copy link
Contributor

tchaikov commented May 9, 2016

lgtm also

@liewegas
Copy link
Member

liewegas commented May 9, 2016

  map<spg_t, int> pgid_tracker;

are you sure that the value is reliably initialized to 0, given that int has no ctor?

@tchaikov
Copy link
Contributor

tchaikov commented May 9, 2016

If an insertion is performed, the mapped value is value-initialized (default-constructed for class types, zero-initialized otherwise) and a reference to it is returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants