From 96532be7657a5f4ce1b5961667524ff05090e522 Mon Sep 17 00:00:00 2001 From: fourtf Date: Tue, 13 Aug 2019 13:02:11 +0200 Subject: [PATCH] removed unused function --- src/providers/twitch/TwitchEmotes.cpp | 7 +------ src/providers/twitch/TwitchEmotes.hpp | 7 +++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/providers/twitch/TwitchEmotes.cpp b/src/providers/twitch/TwitchEmotes.cpp index a58849c6c..8b3f5498f 100644 --- a/src/providers/twitch/TwitchEmotes.cpp +++ b/src/providers/twitch/TwitchEmotes.cpp @@ -45,7 +45,7 @@ QString TwitchEmotes::cleanUpEmoteCode(const EmoteName &dirtyEmoteCode) EmotePtr TwitchEmotes::getOrCreateEmote(const EmoteId &id, const EmoteName &name_) { - static QMap replacements{ + static const QMap replacements{ {"[oO](_|\\.)[oO]", "O_o"}, {"\\>\\;\\(", ">("}, {"\\<\\;3", "<3"}, {"\\:-?(o|O)", ":O"}, {"\\:-?(p|P)", ":P"}, {"\\:-?[\\\\/]", ":/"}, @@ -95,9 +95,4 @@ Url TwitchEmotes::getEmoteLink(const EmoteId &id, const QString &emoteScale) .replace("{scale}", emoteScale)}; } -AccessGuard> TwitchEmotes::accessAll() -{ - return this->twitchEmotes_.access(); -} - } // namespace chatterino diff --git a/src/providers/twitch/TwitchEmotes.hpp b/src/providers/twitch/TwitchEmotes.hpp index a2ef16b05..808d86dba 100644 --- a/src/providers/twitch/TwitchEmotes.hpp +++ b/src/providers/twitch/TwitchEmotes.hpp @@ -7,7 +7,6 @@ #include "common/Aliases.hpp" #include "common/UniqueAccess.hpp" -#include "providers/twitch/TwitchEmotes.hpp" #define TWITCH_EMOTE_TEMPLATE \ "https://static-cdn.jtvnw.net/emoticons/v1/{id}/{scale}" @@ -36,13 +35,13 @@ public: TwitchEmotes(); EmotePtr getOrCreateEmote(const EmoteId &id, const EmoteName &name); - Url getEmoteLink(const EmoteId &id, const QString &emoteScale); - AccessGuard> accessAll(); private: - UniqueAccess> twitchEmotes_; + Url getEmoteLink(const EmoteId &id, const QString &emoteScale); UniqueAccess>> twitchEmotesCache_; + + std::mutex mutex_; }; } // namespace chatterino