diff options
author | Jack Lloyd <[email protected]> | 2017-10-03 00:38:15 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-03 00:38:15 -0400 |
commit | 04d64c3e0fe60a25b1f1a5c2eaf7e2986d2130dd (patch) | |
tree | 3dc2cc7e970fc5f1cdc94887b03704d82c37e07e /src/lib/base/buf_comp.h | |
parent | 180540de74c58a72492692f58b63f32647e80bd8 (diff) |
Add wrappers for reinterpret_cast between char* and uint8_t*
Generally speaking reinterpret_cast is sketchy stuff. But the
special case of char*/uint8_t* is both common and safe. By
isolating those, the remaining (likely sketchy) cases are easier
to grep for.
Diffstat (limited to 'src/lib/base/buf_comp.h')
-rw-r--r-- | src/lib/base/buf_comp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/base/buf_comp.h b/src/lib/base/buf_comp.h index 4c2b3a635..b4e1eb7a1 100644 --- a/src/lib/base/buf_comp.h +++ b/src/lib/base/buf_comp.h @@ -71,7 +71,7 @@ class BOTAN_PUBLIC_API(2,0) Buffered_Computation */ void update(const std::string& str) { - add_data(reinterpret_cast<const uint8_t*>(str.data()), str.size()); + add_data(cast_char_ptr_to_uint8(str.data()), str.size()); } /** |