From f2f99b412f1a8cdf4d4f50a60ec7b76595b80b55 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 29 Jan 2025 20:52:40 -0500 Subject: [PATCH] Shuffle private methods --- SabreTools.DatFiles/DatStatistics.cs | 108 +++++++++++++-------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/SabreTools.DatFiles/DatStatistics.cs b/SabreTools.DatFiles/DatStatistics.cs index b38e48bb..3dad34d6 100644 --- a/SabreTools.DatFiles/DatStatistics.cs +++ b/SabreTools.DatFiles/DatStatistics.cs @@ -245,60 +245,6 @@ namespace SabreTools.DatFiles } } - /// - /// Increment the hash count for a given hash type - /// - /// Hash type to increment - /// Amount to increment by, defaults to 1 - private void AddHashCount(HashType hashType, long interval = 1) - { - lock (_hashCounts) - { - if (!_hashCounts.ContainsKey(hashType)) - _hashCounts[hashType] = 0; - - _hashCounts[hashType] += interval; - if (_hashCounts[hashType] < 0) - _hashCounts[hashType] = 0; - } - } - - /// - /// Increment the item count for a given item type - /// - /// Item type to increment - /// Amount to increment by, defaults to 1 - private void AddItemCount(ItemType itemType, long interval = 1) - { - lock (_itemCounts) - { - if (!_itemCounts.ContainsKey(itemType)) - _itemCounts[itemType] = 0; - - _itemCounts[itemType] += interval; - if (_itemCounts[itemType] < 0) - _itemCounts[itemType] = 0; - } - } - - /// - /// Increment the item count for a given item status - /// - /// Item type to increment - /// Amount to increment by, defaults to 1 - private void AddStatusCount(ItemStatus itemStatus, long interval = 1) - { - lock (_statusCounts) - { - if (!_statusCounts.ContainsKey(itemStatus)) - _statusCounts[itemStatus] = 0; - - _statusCounts[itemStatus] += interval; - if (_statusCounts[itemStatus] < 0) - _statusCounts[itemStatus] = 0; - } - } - /// /// Remove from the statistics given a DatItem /// @@ -380,6 +326,60 @@ namespace SabreTools.DatFiles RemovedCount = 0; } + /// + /// Increment the hash count for a given hash type + /// + /// Hash type to increment + /// Amount to increment by, defaults to 1 + private void AddHashCount(HashType hashType, long interval = 1) + { + lock (_hashCounts) + { + if (!_hashCounts.ContainsKey(hashType)) + _hashCounts[hashType] = 0; + + _hashCounts[hashType] += interval; + if (_hashCounts[hashType] < 0) + _hashCounts[hashType] = 0; + } + } + + /// + /// Increment the item count for a given item type + /// + /// Item type to increment + /// Amount to increment by, defaults to 1 + private void AddItemCount(ItemType itemType, long interval = 1) + { + lock (_itemCounts) + { + if (!_itemCounts.ContainsKey(itemType)) + _itemCounts[itemType] = 0; + + _itemCounts[itemType] += interval; + if (_itemCounts[itemType] < 0) + _itemCounts[itemType] = 0; + } + } + + /// + /// Increment the item count for a given item status + /// + /// Item type to increment + /// Amount to increment by, defaults to 1 + private void AddStatusCount(ItemStatus itemStatus, long interval = 1) + { + lock (_statusCounts) + { + if (!_statusCounts.ContainsKey(itemStatus)) + _statusCounts[itemStatus] = 0; + + _statusCounts[itemStatus] += interval; + if (_statusCounts[itemStatus] < 0) + _statusCounts[itemStatus] = 0; + } + } + /// /// Decrement the hash count for a given hash type ///