Fifo: const correctness

PushFifoAuxBuffer only memcpys data using ptr as the source pointer, so
it can be a pointer to const data because of that.
This commit is contained in:
Lioncash
2017-03-26 20:38:19 -04:00
parent 76cece8157
commit 62db55dee2
3 changed files with 8 additions and 7 deletions

View File

@ -288,12 +288,13 @@ void LoadIndexedXF(u32 val, int refarray)
void PreprocessIndexedXF(u32 val, int refarray)
{
int index = val >> 16;
int size = ((val >> 12) & 0xF) + 1;
const int index = val >> 16;
const int size = ((val >> 12) & 0xF) + 1;
u32* new_data = (u32*)Memory::GetPointer(g_preprocess_cp_state.array_bases[refarray] +
g_preprocess_cp_state.array_strides[refarray] * index);
const u32* new_data =
(u32*)Memory::GetPointer(g_preprocess_cp_state.array_bases[refarray] +
g_preprocess_cp_state.array_strides[refarray] * index);
size_t buf_size = size * sizeof(u32);
const size_t buf_size = size * sizeof(u32);
Fifo::PushFifoAuxBuffer(new_data, buf_size);
}