mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Vectors: Use clear() and has().
Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1".
This commit is contained in:
@@ -39,7 +39,7 @@ void PacketPeer::set_encode_buffer_max_size(int p_max_size) {
|
||||
ERR_FAIL_COND_MSG(p_max_size < 1024, "Max encode buffer must be at least 1024 bytes");
|
||||
ERR_FAIL_COND_MSG(p_max_size > 256 * 1024 * 1024, "Max encode buffer cannot exceed 256 MiB");
|
||||
encode_buffer_max_size = next_power_of_2(p_max_size);
|
||||
encode_buffer.resize(0);
|
||||
encode_buffer.clear();
|
||||
}
|
||||
|
||||
int PacketPeer::get_encode_buffer_max_size() const {
|
||||
|
||||
Reference in New Issue
Block a user