chore: ensure statics are only present once in the final app (#5588)
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
#include "providers/twitch/TwitchCommon.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
const std::vector<QColor> TWITCH_USERNAME_COLORS = {
|
||||
{255, 0, 0}, // Red
|
||||
{0, 0, 255}, // Blue
|
||||
{0, 255, 0}, // Green
|
||||
{178, 34, 34}, // FireBrick
|
||||
{255, 127, 80}, // Coral
|
||||
{154, 205, 50}, // YellowGreen
|
||||
{255, 69, 0}, // OrangeRed
|
||||
{46, 139, 87}, // SeaGreen
|
||||
{218, 165, 32}, // GoldenRod
|
||||
{210, 105, 30}, // Chocolate
|
||||
{95, 158, 160}, // CadetBlue
|
||||
{30, 144, 255}, // DodgerBlue
|
||||
{255, 105, 180}, // HotPink
|
||||
{138, 43, 226}, // BlueViolet
|
||||
{0, 255, 127}, // SpringGreen
|
||||
};
|
||||
|
||||
const QStringList TWITCH_DEFAULT_COMMANDS{
|
||||
"help",
|
||||
"w",
|
||||
"me",
|
||||
"disconnect",
|
||||
"mods",
|
||||
"vips",
|
||||
"color",
|
||||
"commercial",
|
||||
"mod",
|
||||
"unmod",
|
||||
"vip",
|
||||
"unvip",
|
||||
"ban",
|
||||
"unban",
|
||||
"timeout",
|
||||
"untimeout",
|
||||
"slow",
|
||||
"slowoff",
|
||||
"r9kbeta",
|
||||
"r9kbetaoff",
|
||||
"emoteonly",
|
||||
"emoteonlyoff",
|
||||
"clear",
|
||||
"subscribers",
|
||||
"subscribersoff",
|
||||
"followers",
|
||||
"followersoff",
|
||||
"host",
|
||||
"unhost",
|
||||
"raid",
|
||||
"unraid",
|
||||
"delete",
|
||||
"announce",
|
||||
"requests",
|
||||
"warn",
|
||||
};
|
||||
|
||||
const QStringList TWITCH_WHISPER_COMMANDS{"/w", ".w"};
|
||||
|
||||
} // namespace chatterino
|
||||
@@ -7,79 +7,19 @@
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
#ifndef ATTR_UNUSED
|
||||
# ifdef Q_OS_WIN
|
||||
# define ATTR_UNUSED
|
||||
# else
|
||||
# define ATTR_UNUSED __attribute__((unused))
|
||||
# endif
|
||||
#endif
|
||||
[[maybe_unused]] inline const char *const ANONYMOUS_USERNAME = "justinfan64537";
|
||||
|
||||
static const char *ANONYMOUS_USERNAME ATTR_UNUSED = "justinfan64537";
|
||||
|
||||
static constexpr int TWITCH_MESSAGE_LIMIT = 500;
|
||||
inline constexpr int TWITCH_MESSAGE_LIMIT = 500;
|
||||
|
||||
inline QByteArray getDefaultClientID()
|
||||
{
|
||||
return QByteArray("7ue61iz46fz11y3cugd0l3tawb4taal");
|
||||
return QByteArrayLiteral("7ue61iz46fz11y3cugd0l3tawb4taal");
|
||||
}
|
||||
|
||||
static const std::vector<QColor> TWITCH_USERNAME_COLORS = {
|
||||
{255, 0, 0}, // Red
|
||||
{0, 0, 255}, // Blue
|
||||
{0, 255, 0}, // Green
|
||||
{178, 34, 34}, // FireBrick
|
||||
{255, 127, 80}, // Coral
|
||||
{154, 205, 50}, // YellowGreen
|
||||
{255, 69, 0}, // OrangeRed
|
||||
{46, 139, 87}, // SeaGreen
|
||||
{218, 165, 32}, // GoldenRod
|
||||
{210, 105, 30}, // Chocolate
|
||||
{95, 158, 160}, // CadetBlue
|
||||
{30, 144, 255}, // DodgerBlue
|
||||
{255, 105, 180}, // HotPink
|
||||
{138, 43, 226}, // BlueViolet
|
||||
{0, 255, 127}, // SpringGreen
|
||||
};
|
||||
extern const std::vector<QColor> TWITCH_USERNAME_COLORS;
|
||||
|
||||
static const QStringList TWITCH_DEFAULT_COMMANDS{
|
||||
"help",
|
||||
"w",
|
||||
"me",
|
||||
"disconnect",
|
||||
"mods",
|
||||
"vips",
|
||||
"color",
|
||||
"commercial",
|
||||
"mod",
|
||||
"unmod",
|
||||
"vip",
|
||||
"unvip",
|
||||
"ban",
|
||||
"unban",
|
||||
"timeout",
|
||||
"untimeout",
|
||||
"slow",
|
||||
"slowoff",
|
||||
"r9kbeta",
|
||||
"r9kbetaoff",
|
||||
"emoteonly",
|
||||
"emoteonlyoff",
|
||||
"clear",
|
||||
"subscribers",
|
||||
"subscribersoff",
|
||||
"followers",
|
||||
"followersoff",
|
||||
"host",
|
||||
"unhost",
|
||||
"raid",
|
||||
"unraid",
|
||||
"delete",
|
||||
"announce",
|
||||
"requests",
|
||||
"warn",
|
||||
};
|
||||
extern const QStringList TWITCH_DEFAULT_COMMANDS;
|
||||
|
||||
static const QStringList TWITCH_WHISPER_COMMANDS{"/w", ".w"};
|
||||
extern const QStringList TWITCH_WHISPER_COMMANDS;
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace chatterino {
|
||||
// variant
|
||||
/// %1 <-> {id}
|
||||
/// %2 <-> {scale} (1.0, 2.0, 3.0)
|
||||
constexpr QStringView TWITCH_EMOTE_TEMPLATE =
|
||||
inline constexpr QStringView TWITCH_EMOTE_TEMPLATE =
|
||||
u"https://static-cdn.jtvnw.net/emoticons/v2/%1/default/dark/%2";
|
||||
|
||||
struct Emote;
|
||||
@@ -63,8 +63,8 @@ using TwitchEmoteSetMap = boost::unordered_flat_map<EmoteSetId, TwitchEmoteSet>;
|
||||
|
||||
struct HelixChannelEmote;
|
||||
|
||||
constexpr QStringView TWITCH_SUB_EMOTE_SET_PREFIX = u"x-c2-s-";
|
||||
constexpr QStringView TWITCH_BIT_EMOTE_SET_PREFIX = u"x-c2-b-";
|
||||
inline constexpr QStringView TWITCH_SUB_EMOTE_SET_PREFIX = u"x-c2-s-";
|
||||
inline constexpr QStringView TWITCH_BIT_EMOTE_SET_PREFIX = u"x-c2-b-";
|
||||
|
||||
struct TwitchEmoteSetMeta {
|
||||
QString setID;
|
||||
|
||||
Reference in New Issue
Block a user