(CgFormat.Reader): use Binary.CopyOverlapped where applicable.

This commit is contained in:
morkt 2015-11-05 21:25:27 +04:00
parent 64b6312e0b
commit 3a7537afd1

View File

@ -241,20 +241,9 @@ namespace GameRes.Formats.Ainos
if (0 != shift)
{
int src = dst + ShiftTable[shift];
while (0 != count)
{
m_output[dst] = m_output[src];
m_output[dst + 1] = m_output[src+1];
m_output[dst + 2] = m_output[src+2];
src += 3;
dst += 3;
--count;
}
}
else
{
dst += 3 * count;
Binary.CopyOverlapped (m_output, src, dst, count * 3);
}
dst += 3 * count;
}
left += m_width*3; //640*3;
right += m_width*3; //640*3;
@ -301,20 +290,9 @@ namespace GameRes.Formats.Ainos
if (0 != shift)
{
int src = dst + ShiftTable[shift];
while (0 != count)
{
m_output[dst] = m_output[src];
m_output[dst + 1] = m_output[src + 1];
m_output[dst + 2] = m_output[src + 2];
src += 3;
dst += 3;
--count;
}
}
else
{
dst += 3 * count;
Binary.CopyOverlapped (m_output, src, dst, count * 3);
}
dst += 3 * count;
}
right += m_width*3;
left += m_width*3;