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

Fix merge_patch shadow warning #1346

Merged
merged 2 commits into from
Nov 8, 2018

Conversation

ax3l
Copy link
Contributor

@ax3l ax3l commented Nov 8, 2018

Fix -Wshadow warning in public header function merge_patch.
Close #1339

Avoid shadowing a member of this (member function patch) by choosing the same name as parameter (-Wshadow). Instead, make name of parameter more expressive.


Pull request checklist

Read the Contribution Guidelines for detailed information.

  • Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • Code coverage is 100%. Test cases can be added by editing the test suite.
  • The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

Avoid shadowing a member of `this` by choosing the same name as
parameter (`-Wshadow`). Instead, make name of parameter more
expressive.
@ax3l ax3l changed the title Fix merge patch shadow param Fix merge_patch shadow warning Nov 8, 2018
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 798754d on ax3l:fix-mergePatchShadowParam into d2e6e1b on nlohmann:develop.

@nlohmann nlohmann self-assigned this Nov 8, 2018
@nlohmann nlohmann added this to the Release 3.4.1 milestone Nov 8, 2018
Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@nlohmann nlohmann merged commit 30e1cbb into nlohmann:develop Nov 8, 2018
@nlohmann
Copy link
Owner

nlohmann commented Nov 8, 2018

Thanks!

@ax3l ax3l deleted the fix-mergePatchShadowParam branch November 8, 2018 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants