Skip to content

Commit

Permalink
refactor: use vector::empty instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Neko-Life committed Oct 17, 2024
1 parent 445542e commit 60746bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dpp/voice/enabled/write_ready.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void discord_voice_client::write_ready() {
}

/* Fallthrough if paused */
} else if (outbuf.size()) {
} else if (!outbuf.empty()) {
type = send_audio_type;
if (outbuf[0].packet.size() == sizeof(uint16_t) && (*(reinterpret_cast<uint16_t*>(outbuf[0].packet.data()))) == AUDIO_TRACK_MARKER) {
outbuf.erase(outbuf.begin());
Expand All @@ -53,7 +53,7 @@ void discord_voice_client::write_ready() {
tracks--;
}
}
if (outbuf.size()) {
if (!outbuf.empty()) {
if (this->udp_send(outbuf[0].packet.data(), outbuf[0].packet.length()) == (int)outbuf[0].packet.length()) {
duration = outbuf[0].duration * timescale;
bufsize = outbuf[0].packet.length();
Expand Down

0 comments on commit 60746bf

Please sign in to comment.