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

Minor fix: Rename Symbol constructor parameter to prevent shadowing #11979

Merged
merged 1 commit into from Jun 20, 2023
Merged

Conversation

nicovank
Copy link
Contributor

This saves ~25% of warnings on Ubuntu / GCC 11.

../Source/Core/Common/SymbolDB.h:41:38: warning: declaration of ‘name’ shadows a member of ‘Common::Symbol’ [-Wshadow]
   41 |   explicit Symbol(const std::string& name) { Rename(name); }
      |                   ~~~~~~~~~~~~~~~~~~~^~~~
../Source/Core/Common/SymbolDB.h:45:15: note: shadowed declaration is here
   45 |   std::string name;
      |               ^~~~
$ git checkout 27db8d4123
$ cmake . -G Ninja -B build/vanilla -DLINUX_LOCAL_DEV=true
$ cmake --build build/vanilla 2>&1 | grep ": warning:" | wc -l
273

$ git checkout 4ef2f2c710
$ cmake . -G Ninja -B build/patch -DLINUX_LOCAL_DEV=true
$ cmake --build build/patch 2>&1 | grep ": warning:" | wc -l
204

@nicovank nicovank marked this pull request as ready for review June 20, 2023 18:07
@AdmiralCurtiss AdmiralCurtiss merged commit 5ad2d86 into dolphin-emu:master Jun 20, 2023
14 checks passed
@AdmiralCurtiss
Copy link
Contributor

Thanks!

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