diff options
Diffstat (limited to 'src/cpp/util')
-rw-r--r-- | src/cpp/util/byte_buffer_cc.cc | 14 | ||||
-rw-r--r-- | src/cpp/util/slice_cc.cc | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/cpp/util/byte_buffer_cc.cc b/src/cpp/util/byte_buffer_cc.cc index 91ed66b766..cbe0aad26c 100644 --- a/src/cpp/util/byte_buffer_cc.cc +++ b/src/cpp/util/byte_buffer_cc.cc @@ -38,18 +38,18 @@ namespace grpc { ByteBuffer::ByteBuffer(const Slice* slices, size_t nslices) { // The following assertions check that the representation of a grpc::Slice is - // identical to that of a gpr_slice: it has a gpr_slice field, and nothing + // identical to that of a grpc_slice: it has a grpc_slice field, and nothing // else. - static_assert(std::is_same<decltype(slices[0].slice_), gpr_slice>::value, - "Slice must have same representation as gpr_slice"); - static_assert(sizeof(Slice) == sizeof(gpr_slice), - "Slice must have same representation as gpr_slice"); + static_assert(std::is_same<decltype(slices[0].slice_), grpc_slice>::value, + "Slice must have same representation as grpc_slice"); + static_assert(sizeof(Slice) == sizeof(grpc_slice), + "Slice must have same representation as grpc_slice"); // The const_cast is legal if grpc_raw_byte_buffer_create() does no more // than its advertised side effect of increasing the reference count of the // slices it processes, and such an increase does not affect the semantics // seen by the caller of this constructor. buffer_ = grpc_raw_byte_buffer_create( - reinterpret_cast<gpr_slice*>(const_cast<Slice*>(slices)), nslices); + reinterpret_cast<grpc_slice*>(const_cast<Slice*>(slices)), nslices); } ByteBuffer::~ByteBuffer() { @@ -75,7 +75,7 @@ Status ByteBuffer::Dump(std::vector<Slice>* slices) const { return Status(StatusCode::INTERNAL, "Couldn't initialize byte buffer reader"); } - gpr_slice s; + grpc_slice s; while (grpc_byte_buffer_reader_next(&reader, &s)) { slices->push_back(Slice(s, Slice::STEAL_REF)); } diff --git a/src/cpp/util/slice_cc.cc b/src/cpp/util/slice_cc.cc index 7e88423b6c..c05f1cf124 100644 --- a/src/cpp/util/slice_cc.cc +++ b/src/cpp/util/slice_cc.cc @@ -37,12 +37,12 @@ namespace grpc { Slice::Slice() : slice_(gpr_empty_slice()) {} -Slice::~Slice() { gpr_slice_unref(slice_); } +Slice::~Slice() { grpc_slice_unref(slice_); } -Slice::Slice(gpr_slice slice, AddRef) : slice_(gpr_slice_ref(slice)) {} +Slice::Slice(grpc_slice slice, AddRef) : slice_(grpc_slice_ref(slice)) {} -Slice::Slice(gpr_slice slice, StealRef) : slice_(slice) {} +Slice::Slice(grpc_slice slice, StealRef) : slice_(slice) {} -Slice::Slice(const Slice& other) : slice_(gpr_slice_ref(other.slice_)) {} +Slice::Slice(const Slice& other) : slice_(grpc_slice_ref(other.slice_)) {} } // namespace grpc |