dev: Add RecentMessages benchmark (#5071)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -149,19 +149,22 @@ namespace {
|
||||
return authorityBadge;
|
||||
}
|
||||
|
||||
EmoteMap parseChannelEmotes(const QJsonObject &jsonRoot)
|
||||
{
|
||||
auto emotes = EmoteMap();
|
||||
|
||||
for (const auto emoteSetRef : jsonRoot["sets"].toObject())
|
||||
{
|
||||
parseEmoteSetInto(emoteSetRef.toObject(), "Channel", emotes);
|
||||
}
|
||||
|
||||
return emotes;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
using namespace ffz::detail;
|
||||
|
||||
EmoteMap ffz::detail::parseChannelEmotes(const QJsonObject &jsonRoot)
|
||||
{
|
||||
auto emotes = EmoteMap();
|
||||
|
||||
for (const auto emoteSetRef : jsonRoot["sets"].toObject())
|
||||
{
|
||||
parseEmoteSetInto(emoteSetRef.toObject(), "Channel", emotes);
|
||||
}
|
||||
|
||||
return emotes;
|
||||
}
|
||||
|
||||
FfzEmotes::FfzEmotes()
|
||||
: global_(std::make_shared<EmoteMap>())
|
||||
{
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "common/Aliases.hpp"
|
||||
#include "common/Atomic.hpp"
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
@@ -13,6 +15,12 @@ using EmotePtr = std::shared_ptr<const Emote>;
|
||||
class EmoteMap;
|
||||
class Channel;
|
||||
|
||||
namespace ffz::detail {
|
||||
|
||||
EmoteMap parseChannelEmotes(const QJsonObject &jsonRoot);
|
||||
|
||||
} // namespace ffz::detail
|
||||
|
||||
class FfzEmotes final
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user