Replace size() == 0 with is_empty().

This commit is contained in:
Yufeng Ying
2025-03-20 00:07:31 +08:00
parent c7ea8614d7
commit 4f4031a675
147 changed files with 300 additions and 300 deletions

View File

@ -451,7 +451,7 @@ bool WSLPeer::_verify_server_response() {
WSL_CHECK_NC("sec-websocket-accept", _compute_key_response(session_key));
#undef WSL_CHECK_NC
#undef WSL_CHECK
if (supported_protocols.size() == 0) {
if (supported_protocols.is_empty()) {
// We didn't request a custom protocol
ERR_FAIL_COND_V_MSG(headers.has("sec-websocket-protocol"), false, "Received unrequested sub-protocol -> " + headers["sec-websocket-protocol"]);
} else {