aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/slice/slice_string_helpers.cc
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@gmail.com>2018-02-10 08:58:46 -0800
committerGravatar GitHub <noreply@github.com>2018-02-10 08:58:46 -0800
commit10a9e4e4fb5fb6aaacf2d02f10dc7690b98197e7 (patch)
treead77e09e79127aaf26911001f884b7ca8c92edc7 /src/core/lib/slice/slice_string_helpers.cc
parent2650c9730f6b6288a57c5126f629f1e42c2a282c (diff)
parente1bec40dfb8ff7562fc6a6dafb6d0369294e852f (diff)
Merge pull request #14150 from ncteisen/more-clang-tidy
Remove and Prohibit C Style Casts
Diffstat (limited to 'src/core/lib/slice/slice_string_helpers.cc')
-rw-r--r--src/core/lib/slice/slice_string_helpers.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/lib/slice/slice_string_helpers.cc b/src/core/lib/slice/slice_string_helpers.cc
index 4441a26d8e..f91ece3b98 100644
--- a/src/core/lib/slice/slice_string_helpers.cc
+++ b/src/core/lib/slice/slice_string_helpers.cc
@@ -26,8 +26,8 @@
#include "src/core/lib/slice/slice_internal.h"
char* grpc_dump_slice(grpc_slice s, uint32_t flags) {
- return gpr_dump((const char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s),
- flags);
+ return gpr_dump(reinterpret_cast<const char*> GRPC_SLICE_START_PTR(s),
+ GRPC_SLICE_LENGTH(s), flags);
}
/** Finds the initial (\a begin) and final (\a end) offsets of the next
@@ -110,6 +110,7 @@ void grpc_slice_split_without_space(grpc_slice str, const char* sep,
}
bool grpc_parse_slice_to_uint32(grpc_slice str, uint32_t* result) {
- return gpr_parse_bytes_to_uint32((const char*)GRPC_SLICE_START_PTR(str),
- GRPC_SLICE_LENGTH(str), result) != 0;
+ return gpr_parse_bytes_to_uint32(
+ reinterpret_cast<const char*> GRPC_SLICE_START_PTR(str),
+ GRPC_SLICE_LENGTH(str), result) != 0;
}