take advantage of initializer lists

This commit is contained in:
Syping 2024-02-17 20:45:25 +01:00
parent 9202f7ce00
commit 2347974beb
2 changed files with 8 additions and 31 deletions

View file

@ -228,10 +228,7 @@ void settings::add_channel(const channel &channel, dpp::snowflake guild_id)
}
// We will create the guild structure when it is not in memory
guild guild;
guild.id = guild_id;
guild.channel.push_back(channel);
m_guilds.push_back(std::move(guild));
m_guilds.push_back({ guild_id, { channel } });
}
bool settings::add_target(const target &target, dpp::snowflake guild_id, dpp::snowflake channel_id)