Skip to content

Commit

Permalink
fix: SE shadows variable
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Nov 27, 2024
1 parent 6830a83 commit c26defc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/davetest/dave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int main() {
dave_test.on_guild_create([&](const dpp::guild_create_t & event) {
if (event.created->id == TEST_GUILD_ID) {
dpp::discord_client* s = dave_test.get_shard(0);
bool muted = false, deaf = false, enable_dave = false;
bool muted = false, deaf = false, enable_dave = true;
s->connect_voice(TEST_GUILD_ID, TEST_VC_ID, muted, deaf, enable_dave);
}
});
Expand Down
8 changes: 4 additions & 4 deletions src/dpp/sslclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,10 @@ void ssl_client::on_read(socket fd, const struct socket_events& ev) {
}

void ssl_client::on_write(socket fd, const struct socket_events& e) {
/* We wanted write before so keep it */
socket_events se{e};
se.flags |= WANT_WRITE;
owner->socketengine->update_socket(se);
/* We wanted to write before so keep it */
socket_events new_se{e};
new_se.flags |= WANT_WRITE;
owner->socketengine->update_socket(new_se);

if (!tcp_connect_done) {
tcp_connect_done = true;
Expand Down
6 changes: 3 additions & 3 deletions src/unittest/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ Markdown lol \\|\\|spoiler\\|\\| \\~\\~strikethrough\\~\\~ \\`small \\*code\\* b
}
});

bot.on_guild_create([](const dpp::guild_create_t & event) {
bot.on_guild_create([&bot](const dpp::guild_create_t & event) {
if (event.created->id == TEST_GUILD_ID) {
set_test(GUILDCREATE, true);
if (event.presences.size() && event.presences.begin()->second.user_id > 0) {
Expand All @@ -1146,8 +1146,8 @@ Markdown lol \\|\\|spoiler\\|\\| \\~\\~strikethrough\\~\\~ \\`small \\*code\\* b
if (g) {
set_test(CACHE, true);
set_test(VOICECONN, false);
//dpp::discord_client* s = bot.get_shard(0);
//s->connect_voice(g->id, TEST_VC_ID, false, false);
dpp::discord_client* s = bot.get_shard(0);
s->connect_voice(g->id, TEST_VC_ID, false, false);
}
else {
set_test(CACHE, false);
Expand Down

0 comments on commit c26defc

Please sign in to comment.