From 2844bac5656cc27871dc07aa4e547c5f7c4f1b4c Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 11 May 2016 10:57:00 -0700 Subject: [PATCH] Take advantage of new enum ordering --- DATabase/MergeDiff.cs | 4 ++-- SabreHelper/RomManipulation.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DATabase/MergeDiff.cs b/DATabase/MergeDiff.cs index 3111f75a..d44c0888 100644 --- a/DATabase/MergeDiff.cs +++ b/DATabase/MergeDiff.cs @@ -119,7 +119,7 @@ namespace SabreTools foreach (RomData rom in temp) { - if (rom.Dupe != DupeType.ExternalHash && rom.Dupe != DupeType.ExternalAll) + if (rom.Dupe < DupeType.ExternalHash) { if (diffed.ContainsKey(key)) { @@ -178,7 +178,7 @@ namespace SabreTools foreach (RomData rom in temp) { - if (rom.Dupe == DupeType.ExternalHash || rom.Dupe == DupeType.ExternalAll) + if (rom.Dupe >= DupeType.ExternalHash) { if (duplicates.ContainsKey(key)) { diff --git a/SabreHelper/RomManipulation.cs b/SabreHelper/RomManipulation.cs index 58b4affc..64457444 100644 --- a/SabreHelper/RomManipulation.cs +++ b/SabreHelper/RomManipulation.cs @@ -629,8 +629,8 @@ namespace SabreTools.Helper last.MD5 = (last.MD5 == "" && rom.MD5 != "" ? rom.MD5 : last.MD5); last.SHA1 = (last.SHA1 == "" && rom.SHA1 != "" ? rom.SHA1 : last.SHA1); - // If the duplicate is in the same system and dupe is not already set to External - if ((last.SystemID == rom.SystemID || last.SourceID == rom.SourceID) && last.Dupe != DupeType.ExternalHash) + // If the duplicate is in the same system and dupe is not already set to External* + if ((last.SystemID == rom.SystemID || last.SourceID == rom.SourceID) && last.Dupe < DupeType.ExternalHash) { if (last.Game == rom.Game && last.Name == rom.Name) {