clang-tidy: remove C casts
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
8cda090e58
commit
95355fe214
@ -1058,7 +1058,7 @@ namespace Exiv2 {
|
||||
uint8_t pad[2];
|
||||
pad[0] = static_cast<uint8_t>(chunk + 1);
|
||||
pad[1] = static_cast<uint8_t>(chunks);
|
||||
outIo.write((const byte*)iccId_, 12);
|
||||
outIo.write(reinterpret_cast<const byte*>(iccId_), 12);
|
||||
outIo.write((const byte*)pad, 2);
|
||||
if (outIo.write(iccProfile_.c_data(chunk * chunk_size), bytes) != bytes)
|
||||
throw Error(kerImageWriteFailed);
|
||||
|
||||
@ -39,8 +39,8 @@ const unsigned char pngBlank[] = { 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,
|
||||
|
||||
namespace
|
||||
{
|
||||
const auto nullComp = (const Exiv2::byte*)"\0\0";
|
||||
const auto typeICCP = (const Exiv2::byte*)"iCCP";
|
||||
const auto nullComp = reinterpret_cast<const Exiv2::byte*>("\0\0");
|
||||
const auto typeICCP = reinterpret_cast<const Exiv2::byte*>("iCCP");
|
||||
inline bool compare(const char* str, const Exiv2::DataBuf& buf, size_t length)
|
||||
{
|
||||
assert(strlen(str) <= length);
|
||||
@ -641,7 +641,7 @@ namespace Exiv2 {
|
||||
// calculate CRC
|
||||
uLong tmp = crc32(0L, Z_NULL, 0);
|
||||
tmp = crc32(tmp, typeICCP, 4);
|
||||
tmp = crc32(tmp, (const Bytef*)profileName_.data(), nameLength);
|
||||
tmp = crc32(tmp, reinterpret_cast<const Bytef*>(profileName_.data()), nameLength);
|
||||
tmp = crc32(tmp, nullComp, 2);
|
||||
tmp = crc32(tmp, compressed.c_data(), static_cast<uint32_t>(compressed.size()));
|
||||
byte crc[4];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user