-
Notifications
You must be signed in to change notification settings - Fork 84
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
Reduce number of Clang warnings #607
base: master
Are you sure you want to change the base?
Conversation
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.
No. Please leave my switch untouched.
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.
- Is it okay that I replace the macro
RETURN_IF
by directif
s withstd::string::compare
andreturn
s? - Should I replace the inside the macro
RETURN_IF
the::strcmp
bystd::string::compare
? - Should I leave the whole
MediaPriority.cc
as it is, even if subjectively it is more difficult to maintain that it has to be?
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 went with 1. and removed the macro RETURN_IF
but preserved the switch.
f4b7d9b
to
5d026c4
Compare
Found by Clang (Winconsistent-missing-override)
Found by Clang (Wunused-private-field).
Found by Clang (Wunqualified-std-cast-call).
Found by Clang (Wunused-lambda-capture).
Avoids use of C macro that is discouraged by C++ Core gGidlines. Performance should be not crucial in this case. Fixes a warning found by Clang (Wstring-plus-int).
5d026c4
to
25f5528
Compare
Some are only part of
-Wall
or-Wpedantic
.MediaPriority got a major rewrite to use C++ instead of a clever switch statement that is difficult to understand.