Replace 'reinterpret_cast' with 'static_cast'

This commit is contained in:
Dr. Dystopia
2024-07-24 06:24:51 +02:00
parent 53ede795a2
commit 6d44afc7dd
26 changed files with 31 additions and 36 deletions

View File

@ -55,7 +55,7 @@ std::vector<BBoxType> OGLBoundingBox::Read(u32 index, u32 length)
GL_MAP_READ_BIT);
if (ptr)
{
std::memcpy(values.data(), reinterpret_cast<const u8*>(ptr) + sizeof(BBoxType) * index,
std::memcpy(values.data(), static_cast<const u8*>(ptr) + sizeof(BBoxType) * index,
sizeof(BBoxType) * length);
glUnmapBuffer(GL_SHADER_STORAGE_BUFFER);

View File

@ -462,7 +462,7 @@ std::unique_ptr<OGLStagingTexture> OGLStagingTexture::Create(StagingTextureType
}
glBufferStorage(target, buffer_size, nullptr, buffer_flags);
buffer_ptr = reinterpret_cast<char*>(glMapBufferRange(target, 0, buffer_size, map_flags));
buffer_ptr = static_cast<char*>(glMapBufferRange(target, 0, buffer_size, map_flags));
ASSERT(buffer_ptr != nullptr);
}
else
@ -639,7 +639,7 @@ bool OGLStagingTexture::Map()
else
flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
glBindBuffer(m_target, m_buffer_name);
m_map_pointer = reinterpret_cast<char*>(glMapBufferRange(m_target, 0, m_buffer_size, flags));
m_map_pointer = static_cast<char*>(glMapBufferRange(m_target, 0, m_buffer_size, flags));
glBindBuffer(m_target, 0);
return m_map_pointer != nullptr;
}