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
[Don't Merge, Meta one] Cleanup warnings #8684
Changes from 21 commits
d1a8c02
f5950ba
9dd65fa
cb45e9a
c6e58d1
01f788c
5087ba2
ba9df40
ef2ea2e
93957eb
3560ec1
7c59759
516f183
53705d8
50cac1d
9444a0d
8685974
6dbd2fc
2e22067
08925d5
ea4616a
0d9ebff
38475df
62c953a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -928,7 +928,7 @@ GCMemcardRemoveFileRetVal GCMemcard::RemoveFile(u8 index) // index in the direc | |
// here that has an empty file with the filename "Broken File000" where the actual deleted file | ||
// was. Determine when exactly this happens and if this is neccessary for anything. | ||
|
||
memset(&(UpdatedDir.m_dir_entries[index]), 0xFF, DENTRY_SIZE); | ||
memset(static_cast<void*>(&(UpdatedDir.m_dir_entries[index])), 0xFF, DENTRY_SIZE); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably not actually be silenced like this and instead have the initializtion and/or invalidation be done properly within a member function. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Your comments are fair. Let me split the patch and fix some places as you suggested. |
||
UpdatedDir.m_update_counter = UpdatedDir.m_update_counter + 1; | ||
UpdateDirectory(UpdatedDir); | ||
|
||
|
@@ -1108,6 +1108,8 @@ GCMemcardExportFileRetVal GCMemcard::ExportGci(u8 index, const std::string& file | |
return GCMemcardExportFileRetVal::FAIL; | ||
case GCMemcardGetSaveDataRetVal::NOMEMCARD: | ||
return GCMemcardExportFileRetVal::NOMEMCARD; | ||
case GCMemcardGetSaveDataRetVal::SUCCESS: | ||
break; | ||
} | ||
gci.Seek(DENTRY_SIZE + offset, SEEK_SET); | ||
for (unsigned int i = 0; i < size; ++i) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,14 +56,14 @@ ControlState AnalogStick::GetGateRadiusAtAngle(double ang) const | |
return m_stick_gate->GetRadiusAtAngle(ang); | ||
} | ||
|
||
OctagonAnalogStick::OctagonAnalogStick(const char* name, ControlState gate_radius) | ||
: OctagonAnalogStick(name, name, gate_radius) | ||
OctagonAnalogStick::OctagonAnalogStick(const char* _name, ControlState _gate_radius) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We prefer to prefix names with the underscore after the identifier like so: Ditto for all other occurrences There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I use this style because in ControlGroup subfolder, there is exiting code like this. If you prefer other way, I can submit a seperate patch to cleanup them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you have to change this anyways? Members should have the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure. I can make a big change to add a prefix m_ to the fields in the class of ControlGroup There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't. I only see There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so only change name and ui_name here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only the ones necessary to resolve the shadowing. |
||
: OctagonAnalogStick(_name, _name, _gate_radius) | ||
{ | ||
} | ||
|
||
OctagonAnalogStick::OctagonAnalogStick(const char* name, const char* ui_name, | ||
ControlState gate_radius) | ||
: AnalogStick(name, ui_name, std::make_unique<ControllerEmu::OctagonStickGate>(gate_radius)) | ||
OctagonAnalogStick::OctagonAnalogStick(const char* _name, const char* _ui_name, | ||
ControlState _gate_radius) | ||
: AnalogStick(_name, _ui_name, std::make_unique<ControllerEmu::OctagonStickGate>(_gate_radius)) | ||
{ | ||
} | ||
|
||
|
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.
This will not work on Windows and doesn't actually resolve the warning.
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.
Sure. In order to clean up this, it may require significant rewrite of this file.