-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
fix: get rid of some more warnings #5672
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.
clang-tidy made some suggestions
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.
clang-tidy made some suggestions
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.
clang-tidy made some suggestions
@@ -1909,7 +1909,7 @@ void Helix::updateChatSettings( | |||
|
|||
void Helix::onFetchChattersSuccess( | |||
std::shared_ptr<HelixChatters> finalChatters, QString broadcasterID, | |||
QString moderatorID, int maxChattersToFetch, | |||
QString moderatorID, size_t maxChattersToFetch, |
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.
warning: the parameter 'moderatorID' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
src/providers/twitch/api/Helix.hpp:1507:
- QString moderatorID, size_t maxChattersToFetch,
+ const QString& moderatorID, size_t maxChattersToFetch,
QString moderatorID, size_t maxChattersToFetch, | |
const QString& moderatorID, size_t maxChattersToFetch, |
@@ -2022,7 +2022,7 @@ | |||
|
|||
void Helix::onFetchModeratorsSuccess( | |||
std::shared_ptr<std::vector<HelixModerator>> finalModerators, | |||
QString broadcasterID, int maxModeratorsToFetch, | |||
QString broadcasterID, size_t maxModeratorsToFetch, |
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.
warning: the parameter 'broadcasterID' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
src/providers/twitch/api/Helix.hpp:1522:
- QString broadcasterID, size_t maxModeratorsToFetch,
+ const QString& broadcasterID, size_t maxModeratorsToFetch,
QString broadcasterID, size_t maxModeratorsToFetch, | |
const QString& broadcasterID, size_t maxModeratorsToFetch, |
This mainly gets rid of
-Wsign-compare
warnings. These show up when compiling with clang-cl (I know we have them disabled usually).Since Qt 6.8 got a bit more vocal with deprecation warnings, I turned them off for now (only deprecations until 5.15 are enabled). This uses an undocumented
QT_WARN_DEPRECATED_UP_TO
. Once we switch to Qt 6, we can bump this.Maybe we could enable
-Wextra
and-Wpedantic
.