mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix: why did this even compile???
This commit is contained in:
parent
c2caef1de4
commit
da9b747089
|
@ -2010,7 +2010,7 @@ std::pair<MessagePtrMut, HighlightAlert> MessageBuilder::makeIrcMessage(
|
|||
return {builder.release(), highlight};
|
||||
}
|
||||
|
||||
void MessageBuilder::addEmoji(EmotePtr emote)
|
||||
void MessageBuilder::addEmoji(const EmotePtr &emote)
|
||||
{
|
||||
this->emplace<EmoteElement>(emote, MessageElementFlag::EmojiAll);
|
||||
}
|
||||
|
@ -2667,11 +2667,12 @@ void MessageBuilder::addWords(
|
|||
getApp()->getEmotes()->getEmojis()->parse(preText))
|
||||
{
|
||||
boost::apply_visitor(variant::Overloaded{
|
||||
[&](EmotePtr emote) {
|
||||
this->addEmoji(std::move(emote));
|
||||
[&](const EmotePtr &emote) {
|
||||
this->addEmoji(emote);
|
||||
},
|
||||
[&](const QString &text) {
|
||||
this->addTextOrEmote(state, text);
|
||||
[&](QString text) {
|
||||
this->addTextOrEmote(
|
||||
state, std::move(text));
|
||||
},
|
||||
},
|
||||
variant);
|
||||
|
@ -2691,8 +2692,8 @@ void MessageBuilder::addWords(
|
|||
for (auto variant : getApp()->getEmotes()->getEmojis()->parse(word))
|
||||
{
|
||||
boost::apply_visitor(variant::Overloaded{
|
||||
[&](EmotePtr emote) {
|
||||
this->addEmoji(std::move(emote));
|
||||
[&](const EmotePtr &emote) {
|
||||
this->addEmoji(emote);
|
||||
},
|
||||
[&](QString text) {
|
||||
this->addTextOrEmote(state,
|
||||
|
|
|
@ -260,7 +260,7 @@ private:
|
|||
bool bitsStacked = false;
|
||||
int bitsLeft = 0;
|
||||
};
|
||||
void addEmoji(EmotePtr emote);
|
||||
void addEmoji(const EmotePtr &emote);
|
||||
void addTextOrEmote(TextState &state, QString string);
|
||||
|
||||
Outcome tryAppendCheermote(TextState &state, const QString &string);
|
||||
|
|
|
@ -663,8 +663,9 @@ std::vector<MessagePtr> parsePrivMessage(Channel *channel,
|
|||
|
||||
std::vector<MessagePtr> builtMessages;
|
||||
MessageParseArgs args;
|
||||
auto [built, alert] = MessageBuilder::makeIrcMessage(
|
||||
channel, message, args, message->content(), message->isAction(), 0);
|
||||
args.isAction = message->isAction();
|
||||
auto [built, alert] = MessageBuilder::makeIrcMessage(channel, message, args,
|
||||
message->content(), 0);
|
||||
if (built)
|
||||
{
|
||||
builtMessages.emplace_back(std::move(built));
|
||||
|
@ -1019,7 +1020,7 @@ void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *ircMessage)
|
|||
|
||||
auto [message, alert] = MessageBuilder::makeIrcMessage(
|
||||
c, ircMessage, args, unescapeZeroWidthJoiner(ircMessage->parameter(1)),
|
||||
false, 0);
|
||||
0);
|
||||
if (!message)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -286,7 +286,7 @@ TEST_F(FiltersF, TypingContextChecks)
|
|||
QString originalMessage = privmsg->content();
|
||||
|
||||
auto [msg, alert] = MessageBuilder::makeIrcMessage(
|
||||
&channel, privmsg, MessageParseArgs{}, originalMessage, false, 0);
|
||||
&channel, privmsg, MessageParseArgs{}, originalMessage, 0);
|
||||
|
||||
EXPECT_NE(msg.get(), nullptr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue