File tree 1 file changed +16
-16
lines changed
1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -282,18 +282,18 @@ void Packet::Done(int status) {
282
282
283
283
Packet::operator uv_buf_t () const {
284
284
CHECK (data_);
285
- return uv_buf_t {
286
- reinterpret_cast <char *>(data_->ptr_ ),
287
- data_->len_
288
- } ;
285
+ uv_buf_t buf;;
286
+ buf. base = reinterpret_cast <char *>(data_->ptr_ );
287
+ buf. len = data_->len_ ;
288
+ return buf ;
289
289
}
290
290
291
291
Packet::operator ngtcp2_vec () const {
292
292
CHECK (data_);
293
- return ngtcp2_vec {
294
- data_->ptr_ ,
295
- data_->len_
296
- } ;
293
+ ngtcp2_vec vec;
294
+ vec. base = data_->ptr_ ;
295
+ vec. len = data_->len_ ;
296
+ return vec ;
297
297
}
298
298
299
299
void Packet::Truncate (size_t len) {
@@ -429,17 +429,17 @@ Store::Store(v8::Local<v8::ArrayBufferView> view)
429
429
: Store(view->Buffer ()->GetBackingStore(), view->ByteLength(), view->ByteOffset()) {}
430
430
431
431
Store::operator uv_buf_t () const {
432
- return uv_buf_t {
433
- store_ != nullptr ? static_cast <char *>(store_->Data ()) + offset_ : nullptr ,
434
- length_
435
- } ;
432
+ uv_buf_t buf;
433
+ buf. base = store_ != nullptr ? static_cast <char *>(store_->Data ()) + offset_ : nullptr ,
434
+ buf. len = length_;
435
+ return buf ;
436
436
}
437
437
438
438
Store::operator ngtcp2_vec () const {
439
- return ngtcp2_vec {
440
- store_ != nullptr ? static_cast <uint8_t *>(store_->Data ()) + offset_ : nullptr ,
441
- length_
442
- } ;
439
+ ngtcp2_vec vec;
440
+ vec. base = store_ != nullptr ? static_cast <uint8_t *>(store_->Data ()) + offset_ : nullptr ;
441
+ vec. len = length_;
442
+ return vec ;
443
443
}
444
444
445
445
// ======================================================================================
You can’t perform that action at this time.
0 commit comments