fix build

This commit is contained in:
hemirt 2018-08-19 01:06:36 +02:00
parent ad711b4c15
commit 646268ab18
2 changed files with 15 additions and 17 deletions

View file

@ -150,23 +150,21 @@ struct Deserialize<chatterino::IgnorePhrase> {
QString(), false, false,
::chatterino::getSettings()->ignoredPhraseReplace.getValue(), true);
}
};
QString _pattern;
bool _isRegex = false;
bool _isBlock = false;
QString _replace;
bool _caseSens = true;
QString _pattern;
bool _isRegex = false;
bool _isBlock = false;
QString _replace;
bool _caseSens = true;
chatterino::rj::getSafe(value, "pattern", _pattern);
chatterino::rj::getSafe(value, "regex", _isRegex);
chatterino::rj::getSafe(value, "isBlock", _isBlock);
chatterino::rj::getSafe(value, "replaceWith", _replace);
chatterino::rj::getSafe(value, "caseSensitive", _caseSens);
return chatterino::IgnorePhrase(_pattern, _isRegex, _isBlock, _replace, _caseSens);
}
}; // namespace Settings
chatterino::rj::getSafe(value, "pattern", _pattern);
chatterino::rj::getSafe(value, "regex", _isRegex);
chatterino::rj::getSafe(value, "isBlock", _isBlock);
chatterino::rj::getSafe(value, "replaceWith", _replace);
chatterino::rj::getSafe(value, "caseSensitive", _caseSens);
} // namespace pajlada
return chatterino::IgnorePhrase(_pattern, _isRegex, _isBlock, _replace, _caseSens);
}
};
} // namespace Settings
} // namespace pajlada

View file

@ -154,7 +154,7 @@ MessagePtr TwitchMessageBuilder::build()
this->appendTwitchEmote(ircMessage, emote, twitchEmotes);
}
}
auto app = getApp();
const auto &phrases = app->ignores->phrases.getVector();
auto removeEmotesInRange = [&twitchEmotes](int pos, int len) mutable {
auto it = std::remove_if(