From 2e4b10a737198f0a11dda4271cdd79e30c337846 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Thu, 18 Jan 2024 00:26:08 +0100 Subject: [PATCH] Add some mini comments --- src/providers/chatterino/ChatterinoBadges.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/providers/chatterino/ChatterinoBadges.hpp b/src/providers/chatterino/ChatterinoBadges.hpp index be378d99d..64a939b98 100644 --- a/src/providers/chatterino/ChatterinoBadges.hpp +++ b/src/providers/chatterino/ChatterinoBadges.hpp @@ -17,8 +17,14 @@ using EmotePtr = std::shared_ptr; class ChatterinoBadges { public: + /** + * Makes a network request to load Chatterino user badges + */ ChatterinoBadges(); + /** + * Returns the Chatterino badge for the given user + */ std::optional getBadge(const UserId &id); private: @@ -26,7 +32,16 @@ private: std::shared_mutex mutex_; + /** + * Maps Twitch user IDs to their badge index + * Guarded by mutex_ + */ std::unordered_map badgeMap; + + /** + * Keeps a list of badges. + * Indexes in here are referred to by badgeMap + */ std::vector emotes; };