From 60746bfecaca40f70c66389ce088cb49b273530e Mon Sep 17 00:00:00 2001 From: Neko-Life Date: Fri, 18 Oct 2024 00:24:19 +0700 Subject: [PATCH] refactor: use vector::empty instead --- src/dpp/voice/enabled/write_ready.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dpp/voice/enabled/write_ready.cpp b/src/dpp/voice/enabled/write_ready.cpp index 3fda474f45..8287dea2a3 100644 --- a/src/dpp/voice/enabled/write_ready.cpp +++ b/src/dpp/voice/enabled/write_ready.cpp @@ -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(outbuf[0].packet.data()))) == AUDIO_TRACK_MARKER) { outbuf.erase(outbuf.begin()); @@ -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();