PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
This commit is contained in:
committed by
Juan Linietsky
parent
fb8c93c10b
commit
3205a92ad8
@ -43,10 +43,10 @@ String WSLPeer::generate_key() {
|
||||
// Random key
|
||||
RandomNumberGenerator rng;
|
||||
rng.set_seed(OS::get_singleton()->get_unix_time());
|
||||
PoolVector<uint8_t> bkey;
|
||||
Vector<uint8_t> bkey;
|
||||
int len = 16; // 16 bytes, as per RFC
|
||||
bkey.resize(len);
|
||||
PoolVector<uint8_t>::Write w = bkey.write();
|
||||
uint8_t *w = bkey.ptrw();
|
||||
for (int i = 0; i < len; i++) {
|
||||
w[i] = (uint8_t)rng.randi_range(0, 255);
|
||||
}
|
||||
@ -260,10 +260,10 @@ Error WSLPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
|
||||
return ERR_UNAVAILABLE;
|
||||
|
||||
int read = 0;
|
||||
PoolVector<uint8_t>::Write rw = _packet_buffer.write();
|
||||
_in_buffer.read_packet(rw.ptr(), _packet_buffer.size(), &_is_string, read);
|
||||
uint8_t *rw = _packet_buffer.ptrw();
|
||||
_in_buffer.read_packet(rw, _packet_buffer.size(), &_is_string, read);
|
||||
|
||||
*r_buffer = rw.ptr();
|
||||
*r_buffer = rw;
|
||||
r_buffer_size = read;
|
||||
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user