obs-studio
obs-studio copied to clipboard
UI: Remove UNUSED_PARAMETER where unnecessary
Description
Since cpp allows removing the unused parameters from the function name, UNUSED_PARAMETER is not needed, unless it is in an ifdef.
Motivation and Context
Less code
How Has This Been Tested?
Compiled OBS to make sure there were no warnings.
Types of changes
- Code cleanup (non-breaking change which makes code smaller or more readable)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
If the functions is not from a class (so no declaration). You should put the parameter name as comment. Like it was done in AJA:
- https://github.com/obsproject/obs-studio/blob/8befd830a9807e35762006b9c715cdb133ab2c75/UI/frontend-plugins/aja-output-ui/aja-ui-main.cpp#L453
- Where it was discussed: https://github.com/obsproject/obs-studio/pull/6771#discussion_r925232452
Edit: The purpose is mostly to not lose parameters definition/name and their meaning.