From 8e7916556c6530ceca9d0d23aa668647f6ff6c7e Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 7 Apr 2018 03:06:04 +0400 Subject: [PATCH] use Array.Empty() method. --- GameRes/ArcStream.cs | 2 +- GameRes/BinaryStream.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GameRes/ArcStream.cs b/GameRes/ArcStream.cs index 47c9b35e..72482ad7 100644 --- a/GameRes/ArcStream.cs +++ b/GameRes/ArcStream.cs @@ -362,7 +362,7 @@ namespace GameRes } var current_pos = Position; if (0 == count || current_pos >= m_size) - return new byte[0]; + return Array.Empty(); var bytes = m_view.ReadBytes (m_start+current_pos, (uint)Math.Min (count, m_size - current_pos)); Position = current_pos + bytes.Length; return bytes; diff --git a/GameRes/BinaryStream.cs b/GameRes/BinaryStream.cs index 1cfa8cc2..3a7ca08b 100644 --- a/GameRes/BinaryStream.cs +++ b/GameRes/BinaryStream.cs @@ -482,7 +482,7 @@ namespace GameRes { m_source = input.GetBuffer(); if (null == m_source) - m_source = new byte[0]; + m_source = Array.Empty(); } catch (UnauthorizedAccessException) {