Renamed variables to clear some warnings.
This commit is contained in:
@@ -36,9 +36,9 @@ namespace {
|
||||
else
|
||||
{
|
||||
const auto &shortCodes = unparsedEmoji["short_names"];
|
||||
for (const auto &shortCode : shortCodes.GetArray())
|
||||
for (const auto &_shortCode : shortCodes.GetArray())
|
||||
{
|
||||
emojiData->shortCodes.emplace_back(shortCode.GetString());
|
||||
emojiData->shortCodes.emplace_back(_shortCode.GetString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,8 +231,8 @@ void AbstractIrcServer::onConnected()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(this->channelMutex);
|
||||
|
||||
auto connected = makeSystemMessage("connected");
|
||||
connected->flags.set(MessageFlag::ConnectedMessage);
|
||||
auto connectedMsg = makeSystemMessage("connected");
|
||||
connectedMsg->flags.set(MessageFlag::ConnectedMessage);
|
||||
auto reconnected = makeSystemMessage("reconnected");
|
||||
reconnected->flags.set(MessageFlag::ConnectedMessage);
|
||||
|
||||
@@ -256,7 +256,7 @@ void AbstractIrcServer::onConnected()
|
||||
continue;
|
||||
}
|
||||
|
||||
chan->addMessage(connected);
|
||||
chan->addMessage(connectedMsg);
|
||||
}
|
||||
|
||||
this->falloffCounter_ = 1;
|
||||
@@ -268,7 +268,7 @@ void AbstractIrcServer::onDisconnected()
|
||||
|
||||
MessageBuilder b(systemMessage, "disconnected");
|
||||
b->flags.set(MessageFlag::DisconnectedMessage);
|
||||
auto disconnected = b.release();
|
||||
auto disconnectedMsg = b.release();
|
||||
|
||||
for (std::weak_ptr<Channel> &weak : this->channels.values())
|
||||
{
|
||||
@@ -278,7 +278,7 @@ void AbstractIrcServer::onDisconnected()
|
||||
continue;
|
||||
}
|
||||
|
||||
chan->addMessage(disconnected);
|
||||
chan->addMessage(disconnectedMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -666,11 +666,11 @@ void TwitchChannel::refreshChatters()
|
||||
{
|
||||
// setting?
|
||||
const auto streamStatus = this->accessStreamStatus();
|
||||
|
||||
const auto viewerCount = static_cast<int>(streamStatus->viewerCount);
|
||||
if (getSettings()->onlyFetchChattersForSmallerStreamers)
|
||||
{
|
||||
if (streamStatus->live &&
|
||||
streamStatus->viewerCount > getSettings()->smallStreamerLimit)
|
||||
viewerCount > getSettings()->smallStreamerLimit)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -722,8 +722,8 @@ void TwitchChannel::refreshBadges()
|
||||
{
|
||||
auto &versions = (*badgeSets)[jsonBadgeSet.key()];
|
||||
|
||||
auto _ = jsonBadgeSet->toObject()["versions"].toObject();
|
||||
for (auto jsonVersion_ = _.begin(); jsonVersion_ != _.end();
|
||||
auto _set = jsonBadgeSet->toObject()["versions"].toObject();
|
||||
for (auto jsonVersion_ = _set.begin(); jsonVersion_ != _set.end();
|
||||
jsonVersion_++)
|
||||
{
|
||||
auto jsonVersion = jsonVersion_->toObject();
|
||||
|
||||
@@ -334,13 +334,13 @@ MessagePtr TwitchMessageBuilder::build()
|
||||
QRegularExpression emoteregex(
|
||||
"\\b" + std::get<2>(tup).string + "\\b",
|
||||
QRegularExpression::UseUnicodePropertiesOption);
|
||||
auto match = emoteregex.match(midExtendedRef);
|
||||
if (match.hasMatch())
|
||||
auto _match = emoteregex.match(midExtendedRef);
|
||||
if (_match.hasMatch())
|
||||
{
|
||||
int last = match.lastCapturedIndex();
|
||||
int last = _match.lastCapturedIndex();
|
||||
for (int i = 0; i <= last; ++i)
|
||||
{
|
||||
std::get<0>(tup) = from + match.capturedStart();
|
||||
std::get<0>(tup) = from + _match.capturedStart();
|
||||
twitchEmotes.push_back(std::move(tup));
|
||||
}
|
||||
}
|
||||
@@ -781,16 +781,9 @@ void TwitchMessageBuilder::parseHighlights(bool isPastMsg)
|
||||
}
|
||||
|
||||
// update the media player url if necessary
|
||||
QUrl highlightSoundUrl;
|
||||
if (getSettings()->customHighlightSound)
|
||||
{
|
||||
highlightSoundUrl =
|
||||
QUrl::fromLocalFile(getSettings()->pathHighlightSound.getValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
highlightSoundUrl = QUrl("qrc:/sounds/ping2.wav");
|
||||
}
|
||||
QUrl highlightSoundUrl = getSettings()->customHighlightSound
|
||||
? QUrl::fromLocalFile(getSettings()->pathHighlightSound.getValue())
|
||||
: QUrl("qrc:/sounds/ping2.wav");
|
||||
|
||||
if (currentPlayerUrl != highlightSoundUrl)
|
||||
{
|
||||
@@ -1040,11 +1033,11 @@ void TwitchMessageBuilder::appendTwitchBadges()
|
||||
try
|
||||
{
|
||||
if (twitchChannel)
|
||||
if (const auto &badge = this->twitchChannel->twitchBadge(
|
||||
if (const auto &_badge = this->twitchChannel->twitchBadge(
|
||||
"bits", cheerAmount))
|
||||
{
|
||||
this->emplace<EmoteElement>(
|
||||
badge.get(), MessageElementFlag::BadgeVanity)
|
||||
_badge.get(), MessageElementFlag::BadgeVanity)
|
||||
->setTooltip(tooltip);
|
||||
continue;
|
||||
}
|
||||
@@ -1055,10 +1048,10 @@ void TwitchMessageBuilder::appendTwitchBadges()
|
||||
}
|
||||
|
||||
// Use default bit badge
|
||||
if (auto badge = this->twitchChannel->globalTwitchBadges().badge(
|
||||
if (auto _badge = this->twitchChannel->globalTwitchBadges().badge(
|
||||
"bits", cheerAmount))
|
||||
{
|
||||
this->emplace<EmoteElement>(badge.get(),
|
||||
this->emplace<EmoteElement>(_badge.get(),
|
||||
MessageElementFlag::BadgeVanity)
|
||||
->setTooltip(tooltip);
|
||||
}
|
||||
@@ -1174,12 +1167,12 @@ void TwitchMessageBuilder::appendTwitchBadges()
|
||||
->setTooltip((*badgeEmote)->tooltip.string);
|
||||
continue;
|
||||
}
|
||||
if (auto badge = this->twitchChannel->globalTwitchBadges().badge(
|
||||
if (auto _badge = this->twitchChannel->globalTwitchBadges().badge(
|
||||
splits[0], splits[1]))
|
||||
{
|
||||
this->emplace<EmoteElement>(badge.get(),
|
||||
this->emplace<EmoteElement>(_badge.get(),
|
||||
MessageElementFlag::BadgeVanity)
|
||||
->setTooltip((*badge)->tooltip.string);
|
||||
->setTooltip((*_badge)->tooltip.string);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ std::shared_ptr<Channel> TwitchServer::getCustomChannel(
|
||||
{
|
||||
static auto channel =
|
||||
std::make_shared<Channel>("$$$", chatterino::Channel::Type::Misc);
|
||||
static auto timer = [&] {
|
||||
static auto getTimer = [&] {
|
||||
for (auto i = 0; i < 1000; i++)
|
||||
{
|
||||
channel->addMessage(makeSystemMessage(QString::number(i + 1)));
|
||||
|
||||
Reference in New Issue
Block a user