Fix warnings shown by GCC (#47)

* fix all warnings shown by GCC
This commit is contained in:
Dylam De La Torre
2021-11-16 20:38:14 +01:00
committed by GitHub
parent 108002248c
commit 9d21df8e1b
24 changed files with 65 additions and 76 deletions

View File

@@ -23,8 +23,8 @@
Abaddon::Abaddon()
: m_settings(Platform::FindConfigFile())
, m_emojis(GetResPath("/emojis.bin"))
, m_discord(m_settings.GetUseMemoryDB()) { // stupid but easy
, m_discord(m_settings.GetUseMemoryDB()) // stupid but easy
, m_emojis(GetResPath("/emojis.bin")) {
LoadFromSettings();
// todo: set user agent for non-client(?)
@@ -267,7 +267,7 @@ void Abaddon::ShowUserMenu(const GdkEvent *event, Snowflake id, Snowflake guild_
if (guild.has_value() && user.has_value()) {
const auto roles = user->GetSortedRoles();
m_user_menu_roles->set_visible(roles.size() > 0);
for (const auto role : roles) {
for (const auto &role : roles) {
auto *item = Gtk::manage(new Gtk::MenuItem(role.Name));
if (role.Color != 0) {
Gdk::RGBA color;