diff options
author | Noah Eisen <ncteisen@google.com> | 2018-02-09 09:16:55 -0800 |
---|---|---|
committer | Noah Eisen <ncteisen@google.com> | 2018-02-09 09:16:55 -0800 |
commit | be82e64b3debcdb1d9ec6a149fc85af0d46bfb7e (patch) | |
tree | cc5e1234073eb250a2c319b5a4db2919fce060ea /test/core/slice/slice_test.cc | |
parent | 194436342137924b4fb7429bede037a4b5ec7edb (diff) |
Autofix c casts to c++ casts
Diffstat (limited to 'test/core/slice/slice_test.cc')
-rw-r--r-- | test/core/slice/slice_test.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/core/slice/slice_test.cc b/test/core/slice/slice_test.cc index e40154dd0e..5a49793a9e 100644 --- a/test/core/slice/slice_test.cc +++ b/test/core/slice/slice_test.cc @@ -57,7 +57,7 @@ static void test_slice_malloc_returns_something_sensible(void) { } /* We must be able to write to every byte of the data */ for (i = 0; i < length; i++) { - GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = static_cast<uint8_t>(i); } /* And finally we must succeed in destroying the slice */ grpc_slice_unref(slice); @@ -77,7 +77,7 @@ static void test_slice_new_returns_something_sensible(void) { } /* destroy function that sets a mark to indicate it was called. */ -static void set_mark(void* p) { *((int*)p) = 1; } +static void set_mark(void* p) { *(static_cast<int*>(p)) = 1; } static void test_slice_new_with_user_data(void) { int marker = 0; @@ -143,7 +143,7 @@ static void test_slice_sub_works(unsigned length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = static_cast<uint8_t>(i); } /* Ensure that for all subsets length is correct and that we start on the @@ -183,7 +183,7 @@ static void test_slice_split_head_works(size_t length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = static_cast<uint8_t>(i); } /* Ensure that for all subsets length is correct and that we start on the @@ -211,7 +211,7 @@ static void test_slice_split_tail_works(size_t length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = static_cast<uint8_t>(i); } /* Ensure that for all subsets length is correct and that we start on the |