mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #13181 from tygyh/Replace-'reinterpret_cast'
Replace 'reinterpret_cast' with 'static_cast'
This commit is contained in:
@ -79,7 +79,7 @@ std::vector<BBoxType> D3DBoundingBox::Read(u32 index, u32 length)
|
||||
HRESULT hr = D3D::context->Map(m_staging_buffer.Get(), 0, D3D11_MAP_READ, 0, &map);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
std::memcpy(values.data(), reinterpret_cast<const u8*>(map.pData) + sizeof(BBoxType) * index,
|
||||
std::memcpy(values.data(), static_cast<const u8*>(map.pData) + sizeof(BBoxType) * index,
|
||||
sizeof(BBoxType) * length);
|
||||
|
||||
D3D::context->Unmap(m_staging_buffer.Get(), 0);
|
||||
|
@ -244,7 +244,7 @@ void VertexManager::CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 num_in
|
||||
*out_base_index = (cursor + vertexBufferSize) / sizeof(u16);
|
||||
|
||||
D3D::context->Map(m_buffers[m_current_buffer].Get(), 0, MapType, 0, &map);
|
||||
u8* mappedData = reinterpret_cast<u8*>(map.pData);
|
||||
u8* mappedData = static_cast<u8*>(map.pData);
|
||||
if (vertexBufferSize > 0)
|
||||
std::memcpy(mappedData + cursor, m_base_buffer_pointer, vertexBufferSize);
|
||||
if (indexBufferSize > 0)
|
||||
|
@ -327,7 +327,7 @@ bool DXStagingTexture::Map()
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
m_map_pointer = reinterpret_cast<char*>(sr.pData);
|
||||
m_map_pointer = static_cast<char*>(sr.pData);
|
||||
m_map_stride = sr.RowPitch;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user