Replace use of C style casts

This commit is contained in:
Jonas Kvinge
2020-06-15 17:59:02 +02:00
parent a68c249d4e
commit 72ede666d4
35 changed files with 105 additions and 111 deletions

View File

@@ -848,8 +848,8 @@ ByteVector ByteVector::fromBase64(const ByteVector &input) {
ByteVector output(len);
const unsigned char *src = (const unsigned char *)input.data();
unsigned char *dst = (unsigned char *)output.data();
const unsigned char *src = reinterpret_cast<const unsigned char*>(input.data());
unsigned char *dst = reinterpret_cast<unsigned char*>(output.data());
while (4 <= len) {
@@ -899,7 +899,7 @@ ByteVector ByteVector::fromBase64(const ByteVector &input) {
// Only return output if we processed all bytes
if (len == 0) {
output.resize(static_cast<unsigned int>(dst - (unsigned char *)output.data()));
output.resize(static_cast<unsigned int>(dst - reinterpret_cast<unsigned char*>(output.data())));
return output;
}
return ByteVector();