diff --git a/src/components/channelscellrenderer.cpp b/src/components/channelscellrenderer.cpp index 4578020..16fd25f 100644 --- a/src/components/channelscellrenderer.cpp +++ b/src/components/channelscellrenderer.cpp @@ -576,7 +576,7 @@ void CellRendererChannels::cairo_path_rounded_rect(const Cairo::RefPtr &cr, Gtk::Widget &widget, int mentions, int edge, const Gdk::Rectangle &cell_area) { Pango::FontDescription font; font.set_family("sans 14"); - //font.set_weight(Pango::WEIGHT_BOLD); + // font.set_weight(Pango::WEIGHT_BOLD); auto layout = widget.create_pango_layout(std::to_string(mentions)); layout->set_font_description(font); diff --git a/src/components/chatwindow.cpp b/src/components/chatwindow.cpp index 9b34dfd..df2b6b8 100644 --- a/src/components/chatwindow.cpp +++ b/src/components/chatwindow.cpp @@ -88,7 +88,7 @@ ChatWindow::ChatWindow() { m_meta->add(*m_input_indicator); m_meta->add(*m_rate_limit_indicator); - //m_scroll->add(*m_list); + // m_scroll->add(*m_list); m_main->add(m_topic); m_main->add(*m_chat); m_main->add(m_completer); diff --git a/src/components/chatwindow.hpp b/src/components/chatwindow.hpp index de55b0a..db0bfc4 100644 --- a/src/components/chatwindow.hpp +++ b/src/components/chatwindow.hpp @@ -47,8 +47,8 @@ protected: void OnMessageSendFail(const std::string &nonce, float retry_after); Gtk::Box *m_main; - //Gtk::ListBox *m_list; - //Gtk::ScrolledWindow *m_scroll; + // Gtk::ListBox *m_list; + // Gtk::ScrolledWindow *m_scroll; Gtk::EventBox m_topic; // todo probably make everything else go on the stack Gtk::Label m_topic_text; diff --git a/src/dialogs/token.cpp b/src/dialogs/token.cpp index f984990..85853e8 100644 --- a/src/dialogs/token.cpp +++ b/src/dialogs/token.cpp @@ -1,6 +1,6 @@ #include "token.hpp" -std::string trim(const std::string& str) { +std::string trim(const std::string &str) { const auto first = str.find_first_not_of(' '); if (first == std::string::npos) return str; const auto last = str.find_last_not_of(' '); diff --git a/src/discord/activity.hpp b/src/discord/activity.hpp index 6b8e944..4382ac0 100644 --- a/src/discord/activity.hpp +++ b/src/discord/activity.hpp @@ -26,7 +26,7 @@ constexpr inline const char *GetPresenceString(PresenceStatus s) { return ""; } -constexpr inline const char* GetPresenceDisplayString(PresenceStatus s) { +constexpr inline const char *GetPresenceDisplayString(PresenceStatus s) { switch (s) { case PresenceStatus::Online: return "Online"; diff --git a/src/discord/ban.hpp b/src/discord/ban.hpp index d417ce3..7ab3d33 100644 --- a/src/discord/ban.hpp +++ b/src/discord/ban.hpp @@ -4,7 +4,7 @@ struct BanData { std::string Reason; // null - UserData User; // access id + UserData User; // access id friend void from_json(const nlohmann::json &j, BanData &m); }; diff --git a/src/discord/interactions.hpp b/src/discord/interactions.hpp index c076145..782c491 100644 --- a/src/discord/interactions.hpp +++ b/src/discord/interactions.hpp @@ -14,10 +14,10 @@ enum class InteractionType { }; struct MessageInteractionData { - Snowflake ID; // id of the interaction - InteractionType Type; // the type of interaction - std::string Name; // the name of the ApplicationCommand - UserData User; // the user who invoked the interaction + Snowflake ID; // id of the interaction + InteractionType Type; // the type of interaction + std::string Name; // the name of the ApplicationCommand + UserData User; // the user who invoked the interaction // undocumented??? std::optional Member; // the member who invoked the interaction (in a guild) diff --git a/src/discord/relationship.hpp b/src/discord/relationship.hpp index d492bd3..1595502 100644 --- a/src/discord/relationship.hpp +++ b/src/discord/relationship.hpp @@ -3,19 +3,19 @@ #include "user.hpp" enum class RelationshipType { - None = 0, - Friend = 1, - Blocked = 2, - PendingIncoming = 3, - PendingOutgoing = 4, - Implicit = 5, + None = 0, + Friend = 1, + Blocked = 2, + PendingIncoming = 3, + PendingOutgoing = 4, + Implicit = 5, }; struct RelationshipData { // Snowflake UserID; this is the same as ID apparently but it looks new so i wont touch it RelationshipType Type; Snowflake ID; - // Unknown Nickname; // null + // Unknown Nickname; // null - friend void from_json(const nlohmann::json &j, RelationshipData &m); + friend void from_json(const nlohmann::json &j, RelationshipData &m); }; diff --git a/src/discord/snowflake.cpp b/src/discord/snowflake.cpp index efa327d..3624c01 100644 --- a/src/discord/snowflake.cpp +++ b/src/discord/snowflake.cpp @@ -2,8 +2,8 @@ #include "util.hpp" #include #include -#include #include +#include constexpr static uint64_t DiscordEpochSeconds = 1420070400; diff --git a/src/discord/store.cpp b/src/discord/store.cpp index e182c70..6a3d636 100644 --- a/src/discord/store.cpp +++ b/src/discord/store.cpp @@ -812,8 +812,8 @@ std::optional Store::GetGuildMember(Snowflake guild_id, Snowflake u s->Get(2, r.Nickname); s->Get(3, r.JoinedAt); s->Get(4, r.PremiumSince); - //s->Get(5, r.IsDeafened); - //s->Get(6, r.IsMuted); + // s->Get(5, r.IsDeafened); + // s->Get(6, r.IsMuted); s->Get(7, r.Avatar); s->Get(8, r.IsPending); @@ -873,8 +873,8 @@ Message Store::GetMessageBound(std::unique_ptr &s) const { s->Get(4, r.Content); s->Get(5, r.Timestamp); s->Get(6, r.EditedTimestamp); - //s->Get(7, r.IsTTS); - //s->Get(8, r.DoesMentionEveryone); + // s->Get(7, r.IsTTS); + // s->Get(8, r.DoesMentionEveryone); s->GetJSON(9, r.Embeds); s->Get(10, r.IsPinned); s->Get(11, r.WebhookID); @@ -999,7 +999,7 @@ RoleData Store::GetRoleBound(std::unique_ptr &s) const { RoleData r; s->Get(0, r.ID); - //s->Get(1, guild id); + // s->Get(1, guild id); s->Get(2, r.Name); s->Get(3, r.Color); s->Get(4, r.IsHoisted); diff --git a/src/discord/usersettings.hpp b/src/discord/usersettings.hpp index 6d37b3c..2baf61e 100644 --- a/src/discord/usersettings.hpp +++ b/src/discord/usersettings.hpp @@ -6,7 +6,7 @@ struct UserSettingsGuildFoldersEntry { int Color = -1; // null std::vector GuildIDs; - Snowflake ID; // null (this can be a snowflake as a string or an int that isnt a snowflake lol) + Snowflake ID; // null (this can be a snowflake as a string or an int that isnt a snowflake lol) std::string Name; // null friend void from_json(const nlohmann::json &j, UserSettingsGuildFoldersEntry &m); @@ -19,16 +19,16 @@ struct UserSettings { std::string Status; // bool ShouldShowCurrentGame; // // std::vector RestrictedGuilds; // - bool ShouldRenderReactions; // - bool ShouldRenderEmbeds; // - bool IsNativePhoneIntegrationEnabled; // - bool ShouldMessageDisplayCompact; // - std::string Locale; // - bool ShouldInlineEmbedMedia; // - bool ShouldInlineAttachmentMedia; // - std::vector GuildPositions; // deprecated? + bool ShouldRenderReactions; // + bool ShouldRenderEmbeds; // + bool IsNativePhoneIntegrationEnabled; // + bool ShouldMessageDisplayCompact; // + std::string Locale; // + bool ShouldInlineEmbedMedia; // + bool ShouldInlineAttachmentMedia; // + std::vector GuildPositions; // deprecated? std::vector GuildFolders; // - bool ShouldGIFAutoplay; // + bool ShouldGIFAutoplay; // // Unknown FriendSourceFlags; // int ExplicitContentFilter; // bool IsTTSCommandEnabled; // diff --git a/src/http.cpp b/src/http.cpp index 790add7..877970a 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -99,7 +99,7 @@ void request::prepare() { namespace detail { size_t curl_write_data_callback(void *ptr, size_t size, size_t nmemb, void *userdata) { const size_t n = size * nmemb; - static_cast(userdata)->append(static_cast(ptr), n); + static_cast(userdata)->append(static_cast(ptr), n); return n; } diff --git a/src/platform.hpp b/src/platform.hpp index e321d4e..8083a5a 100644 --- a/src/platform.hpp +++ b/src/platform.hpp @@ -6,4 +6,4 @@ bool SetupFonts(); std::string FindResourceFolder(); std::string FindConfigFile(); std::string FindStateCacheFolder(); -} +} // namespace Platform