diff options
author | 2018-02-09 09:16:55 -0800 | |
---|---|---|
committer | 2018-02-09 09:16:55 -0800 | |
commit | be82e64b3debcdb1d9ec6a149fc85af0d46bfb7e (patch) | |
tree | cc5e1234073eb250a2c319b5a4db2919fce060ea /test/core/util/slice_splitter.cc | |
parent | 194436342137924b4fb7429bede037a4b5ec7edb (diff) |
Autofix c casts to c++ casts
Diffstat (limited to 'test/core/util/slice_splitter.cc')
-rw-r--r-- | test/core/util/slice_splitter.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/core/util/slice_splitter.cc b/test/core/util/slice_splitter.cc index c92fc0affe..e766c1982c 100644 --- a/test/core/util/slice_splitter.cc +++ b/test/core/util/slice_splitter.cc @@ -46,7 +46,7 @@ void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice* src_slices, case GRPC_SLICE_SPLIT_IDENTITY: *dst_slice_count = src_slice_count; *dst_slices = - (grpc_slice*)gpr_malloc(sizeof(grpc_slice) * src_slice_count); + static_cast<grpc_slice*>(gpr_malloc(sizeof(grpc_slice) * src_slice_count)); for (i = 0; i < src_slice_count; i++) { (*dst_slices)[i] = src_slices[i]; grpc_slice_ref((*dst_slices)[i]); @@ -58,7 +58,7 @@ void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice* src_slices, for (i = 0; i < src_slice_count; i++) { length += GRPC_SLICE_LENGTH(src_slices[i]); } - *dst_slices = (grpc_slice*)gpr_malloc(sizeof(grpc_slice)); + *dst_slices = static_cast<grpc_slice*>(gpr_malloc(sizeof(grpc_slice))); **dst_slices = grpc_slice_malloc(length); length = 0; for (i = 0; i < src_slice_count; i++) { @@ -74,7 +74,7 @@ void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice* src_slices, length += GRPC_SLICE_LENGTH(src_slices[i]); } *dst_slice_count = length; - *dst_slices = (grpc_slice*)gpr_malloc(sizeof(grpc_slice) * length); + *dst_slices = static_cast<grpc_slice*>(gpr_malloc(sizeof(grpc_slice) * length)); length = 0; for (i = 0; i < src_slice_count; i++) { for (j = 0; j < GRPC_SLICE_LENGTH(src_slices[i]); j++) { @@ -114,7 +114,7 @@ grpc_slice grpc_slice_merge(grpc_slice* slices, size_t nslices) { for (i = 0; i < nslices; i++) { if (GRPC_SLICE_LENGTH(slices[i]) + length > capacity) { capacity = GPR_MAX(capacity * 2, GRPC_SLICE_LENGTH(slices[i]) + length); - out = (uint8_t*)gpr_realloc(out, capacity); + out = static_cast<uint8_t*>(gpr_realloc(out, capacity)); } memcpy(out + length, GRPC_SLICE_START_PTR(slices[i]), GRPC_SLICE_LENGTH(slices[i])); |