diff --git a/src/common/Common.hpp b/src/common/Common.hpp index 226335a1468..4234172ab4b 100644 --- a/src/common/Common.hpp +++ b/src/common/Common.hpp @@ -8,24 +8,15 @@ namespace chatterino { -inline constexpr auto &LINK_CHATTERINO_WIKI_DATA = - u"https://wiki.chatterino.com"; -inline constexpr auto &LINK_CHATTERINO_DISCORD_DATA = +constexpr QStringView LINK_CHATTERINO_WIKI = u"https://wiki.chatterino.com"; +constexpr QStringView LINK_CHATTERINO_DISCORD = u"https://discord.gg/7Y5AYhAK4z"; -inline constexpr auto &LINK_CHATTERINO_SOURCE_DATA = +constexpr QStringView LINK_CHATTERINO_SOURCE = u"https://github.com/Chatterino/chatterino2"; -inline constexpr auto &TWITCH_PLAYER_URL_DATA = +constexpr QStringView TWITCH_PLAYER_URL = u"https://player.twitch.tv/?channel=%1&parent=twitch.tv"; -inline constexpr QStringView LINK_CHATTERINO_WIKI = LINK_CHATTERINO_WIKI_DATA; -inline constexpr QStringView LINK_CHATTERINO_DISCORD = - LINK_CHATTERINO_DISCORD_DATA; -inline constexpr QStringView LINK_CHATTERINO_SOURCE = - LINK_CHATTERINO_SOURCE_DATA; - -inline constexpr QStringView TWITCH_PLAYER_URL = TWITCH_PLAYER_URL_DATA; - enum class HighlightState { None, Highlighted, diff --git a/src/controllers/filters/lang/Filter.cpp b/src/controllers/filters/lang/Filter.cpp index 7173fed6d15..aa1dc0f3430 100644 --- a/src/controllers/filters/lang/Filter.cpp +++ b/src/controllers/filters/lang/Filter.cpp @@ -10,7 +10,7 @@ namespace chatterino::filters { -const QMap MESSAGE_TYPING_CONTEXT = { +extern const QMap MESSAGE_TYPING_CONTEXT = { {"author.badges", Type::StringList}, {"author.color", Type::Color}, {"author.name", Type::String}, diff --git a/src/controllers/filters/lang/Tokenizer.cpp b/src/controllers/filters/lang/Tokenizer.cpp index f2822020b99..602e145dd10 100644 --- a/src/controllers/filters/lang/Tokenizer.cpp +++ b/src/controllers/filters/lang/Tokenizer.cpp @@ -16,7 +16,7 @@ const QRegularExpression TOKEN_REGEX( namespace chatterino::filters { -const QMap validIdentifiersMap = { +extern const QMap validIdentifiersMap = { {"author.badges", "author badges"}, {"author.color", "author color"}, {"author.name", "author name"}, diff --git a/src/providers/twitch/TwitchCommon.cpp b/src/providers/twitch/TwitchCommon.cpp index 91d09e6a739..1830b1edb86 100644 --- a/src/providers/twitch/TwitchCommon.cpp +++ b/src/providers/twitch/TwitchCommon.cpp @@ -2,7 +2,7 @@ namespace chatterino { -const std::vector TWITCH_USERNAME_COLORS = { +extern const std::vector TWITCH_USERNAME_COLORS = { {255, 0, 0}, // Red {0, 0, 255}, // Blue {0, 255, 0}, // Green @@ -20,7 +20,7 @@ const std::vector TWITCH_USERNAME_COLORS = { {0, 255, 127}, // SpringGreen }; -const QStringList TWITCH_DEFAULT_COMMANDS{ +extern const QStringList TWITCH_DEFAULT_COMMANDS{ "help", "w", "me", @@ -58,6 +58,6 @@ const QStringList TWITCH_DEFAULT_COMMANDS{ "warn", }; -const QStringList TWITCH_WHISPER_COMMANDS{"/w", ".w"}; +extern const QStringList TWITCH_WHISPER_COMMANDS{"/w", ".w"}; } // namespace chatterino diff --git a/src/providers/twitch/TwitchEmotes.hpp b/src/providers/twitch/TwitchEmotes.hpp index 43a9d758a5a..2626089269a 100644 --- a/src/providers/twitch/TwitchEmotes.hpp +++ b/src/providers/twitch/TwitchEmotes.hpp @@ -64,12 +64,8 @@ using TwitchEmoteSetMap = boost::unordered_flat_map; struct HelixChannelEmote; -inline constexpr auto &TWITCH_SUB_EMOTE_SET_PREFIX_DATA = u"x-c2-s-"; -inline constexpr auto &TWITCH_BIT_EMOTE_SET_PREFIX_DATA = u"x-c2-b-"; -inline constexpr QStringView TWITCH_SUB_EMOTE_SET_PREFIX = - TWITCH_SUB_EMOTE_SET_PREFIX_DATA; -inline constexpr QStringView TWITCH_BIT_EMOTE_SET_PREFIX = - TWITCH_BIT_EMOTE_SET_PREFIX_DATA; +constexpr QStringView TWITCH_SUB_EMOTE_SET_PREFIX = u"x-c2-s-"; +constexpr QStringView TWITCH_BIT_EMOTE_SET_PREFIX = u"x-c2-b-"; struct TwitchEmoteSetMeta { QString setID;