mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
use Array.Empty() method.
This commit is contained in:
parent
9ef70bea72
commit
8e7916556c
@ -362,7 +362,7 @@ namespace GameRes
|
|||||||
}
|
}
|
||||||
var current_pos = Position;
|
var current_pos = Position;
|
||||||
if (0 == count || current_pos >= m_size)
|
if (0 == count || current_pos >= m_size)
|
||||||
return new byte[0];
|
return Array.Empty<byte>();
|
||||||
var bytes = m_view.ReadBytes (m_start+current_pos, (uint)Math.Min (count, m_size - current_pos));
|
var bytes = m_view.ReadBytes (m_start+current_pos, (uint)Math.Min (count, m_size - current_pos));
|
||||||
Position = current_pos + bytes.Length;
|
Position = current_pos + bytes.Length;
|
||||||
return bytes;
|
return bytes;
|
||||||
|
@ -482,7 +482,7 @@ namespace GameRes
|
|||||||
{
|
{
|
||||||
m_source = input.GetBuffer();
|
m_source = input.GetBuffer();
|
||||||
if (null == m_source)
|
if (null == m_source)
|
||||||
m_source = new byte[0];
|
m_source = Array.Empty<byte>();
|
||||||
}
|
}
|
||||||
catch (UnauthorizedAccessException)
|
catch (UnauthorizedAccessException)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user