From ffb18b364191f9a32b6a4bbc4df2b8f4c6df4e92 Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 23 Oct 2014 02:29:37 +0200 Subject: [PATCH] Make SegmentedAddonFileInfo use cached values, (very) slight performance improvement. --- src/addoncreator/Addon/SegmentedAddonFileInfo.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/addoncreator/Addon/SegmentedAddonFileInfo.cs b/src/addoncreator/Addon/SegmentedAddonFileInfo.cs index 6c92f95..d4d66d0 100644 --- a/src/addoncreator/Addon/SegmentedAddonFileInfo.cs +++ b/src/addoncreator/Addon/SegmentedAddonFileInfo.cs @@ -18,6 +18,19 @@ namespace GarrysMod.AddonCreator.Addon _hash = fileHash; } + public override long Size + { + get + { + return _len; + } + } + + public override int Crc32Hash + { + get { return _hash; } + } + public override byte[] GetContents() { lock (_stream)