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
Resolve Linux GCC Warnings #10624
Resolve Linux GCC Warnings #10624
Conversation
9df1fab
to
7c6543c
Compare
7c6543c
to
2b8842c
Compare
@@ -55,10 +55,10 @@ struct SlopeContext | |||
struct Slope | |||
{ | |||
Slope() = default; | |||
Slope(float f0, float f1, float f2, const SlopeContext& ctx) : f0(f0) | |||
Slope(float f0_, float f1_, float f2_, const SlopeContext& ctx) : f0(f0_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it’s nicer to make the change to the internal var name instead of the name used in exposed declaration (also what Google coding standard suggests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree, but if it makes it consistent with other code, sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see the argument for this with private members variables, but when they're public this makes the constructor nicer at the expense of making every other access to the struct members uglier.
I believe Google's style guide agrees with me here ("Class Data Members" vs "Struct Data Members").
2b8842c
to
6c699ce
Compare
This PR is not dead btw |
2e1f1f2
to
4984f9f
Compare
4984f9f
to
69e32de
Compare
Is there anything else that needs to be done, or is this just waiting for review? |
These annoyed me, so I fixed them.
These warnings are being resolved by #10610
/Core/Common/FifoPlayer.cpp : void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct CPState’ with no trivial copy-assignment; use copy-initialization instead [-Wclass-memaccess]
/Core/VideoCommon/CPMemory.cpp : void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct CPState’ with no trivial copy-assignment; use copy-initialization instead [-Wclass-memaccess]
This warning is being resolved by #10374
/Core/Core/HW/EXI/EXI.h : 'ExpansionInterface::SLOTS’ defined but not used [-Wunused-variable]