fix: Fixed some compiler warnings (#5028)
* fix(C4101): unreferenced local variable * fix(C4189): variable initialized but not referenced * fix(C4305): narrowing from double to float * fix(C4457): declaration hiding function parameter * fix(C4456): shadowing declaration * fix(C4996): remove deprecations * chore: add changelog entry * fix: Remove more unused variables * fix: removed unused lambda captures * Update changelog entry --------- Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -11,10 +11,6 @@
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
const int RECONNECT_BASE_INTERVAL = 2000;
|
||||
// 60 falloff counter means it will try to reconnect at most every 60*2 seconds
|
||||
const int MAX_FALLOFF_COUNTER = 60;
|
||||
|
||||
// Ratelimits for joinBucket_
|
||||
const int JOIN_RATELIMIT_BUDGET = 18;
|
||||
const int JOIN_RATELIMIT_COOLDOWN = 12500;
|
||||
|
||||
@@ -16,7 +16,7 @@ IrcConnection::IrcConnection(QObject *parent)
|
||||
{
|
||||
// Log connection errors for ease-of-debugging
|
||||
QObject::connect(this, &Communi::IrcConnection::socketError, this,
|
||||
[this](QAbstractSocket::SocketError error) {
|
||||
[](QAbstractSocket::SocketError error) {
|
||||
qCDebug(chatterinoIrc) << "Connection error:" << error;
|
||||
});
|
||||
|
||||
|
||||
@@ -210,7 +210,6 @@ PubSub::PubSub(const QString &host, std::chrono::seconds pingInterval)
|
||||
}
|
||||
|
||||
action.target.login = args[0].toString();
|
||||
bool ok;
|
||||
action.messageText = args[1].toString();
|
||||
action.messageId = args[2].toString();
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace {
|
||||
#else
|
||||
const QString MAGIC_MESSAGE_SUFFIX = QString::fromUtf8(u8" \U000E0000");
|
||||
#endif
|
||||
constexpr int TITLE_REFRESH_PERIOD = 10000;
|
||||
constexpr int CLIP_CREATION_COOLDOWN = 5000;
|
||||
const QString CLIPS_LINK("https://clips.twitch.tv/%1");
|
||||
const QString CLIPS_FAILURE_CLIPS_DISABLED_TEXT(
|
||||
|
||||
@@ -1729,7 +1729,7 @@ void TwitchMessageBuilder::listOfUsersSystemMessage(
|
||||
MessagePtr TwitchMessageBuilder::buildHypeChatMessage(
|
||||
Communi::IrcPrivateMessage *message)
|
||||
{
|
||||
auto level = message->tag(u"pinned-chat-paid-level"_s).toString();
|
||||
auto levelID = message->tag(u"pinned-chat-paid-level"_s).toString();
|
||||
auto currency = message->tag(u"pinned-chat-paid-currency"_s).toString();
|
||||
bool okAmount = false;
|
||||
auto amount = message->tag(u"pinned-chat-paid-amount"_s).toInt(&okAmount);
|
||||
@@ -1743,7 +1743,7 @@ MessagePtr TwitchMessageBuilder::buildHypeChatMessage(
|
||||
// additionally, there's `pinned-chat-paid-is-system-message` which isn't used by Chatterino.
|
||||
|
||||
QString subtitle;
|
||||
auto levelIt = HYPE_CHAT_PAID_LEVEL.find(level);
|
||||
auto levelIt = HYPE_CHAT_PAID_LEVEL.find(levelID);
|
||||
if (levelIt != HYPE_CHAT_PAID_LEVEL.end())
|
||||
{
|
||||
const auto &level = levelIt->second;
|
||||
|
||||
Reference in New Issue
Block a user