Downgrade some casts

Do a quick sweep through the codebase to eliminate some reinterpret_cast<>s
where less fire power would do just fine.
This commit is contained in:
Nathaniel Wesley Filardo
2022-03-17 17:55:47 +00:00
committed by Nathaniel Wesley Filardo
parent 62cce1a20e
commit 4ad99d7392
4 changed files with 11 additions and 16 deletions

View File

@@ -30,7 +30,7 @@ void shape(size_t size)
// size / alignment) * alignment;
Shape s;
s.object = ThreadAlloc::get().alloc(rsize);
s.dst = reinterpret_cast<unsigned char*>(s.object) + offset;
s.dst = static_cast<unsigned char*>(s.object) + offset;
// Bring into cache the destination of the copy.
memset(s.dst, 0xFF, size);
allocs.push_back(s);
@@ -51,7 +51,7 @@ void test_memcpy(size_t size, void* src, Memcpy mc)
{
for (auto& s : allocs)
{
auto* dst = reinterpret_cast<unsigned char*>(s.dst);
auto* dst = static_cast<unsigned char*>(s.dst);
mc(dst, src, size);
}
}