[DatItem] Fix child classes equatiblity

This commit is contained in:
Matt Nadareski
2016-09-19 22:28:17 -07:00
parent 9a7be539fb
commit de5e63a695
6 changed files with 14 additions and 14 deletions

View File

@@ -73,13 +73,13 @@
public override bool Equals(DatItem other)
{
// If we don't have a rom, return false
if (_itemType == other.Type)
// If we don't have an archive, return false
if (_itemType != other.Type)
{
return false;
}
// Otherwise, treat it as a rom
// Otherwise, treat it as an archive
Archive newOther = (Archive)other;
// If the archive information matches

View File

@@ -103,13 +103,13 @@
public override bool Equals(DatItem other)
{
// If we don't have a rom, return false
if (_itemType == other.Type)
// If we don't have a biosset, return false
if (_itemType != other.Type)
{
return false;
}
// Otherwise, treat it as a rom
// Otherwise, treat it as a biosset
BiosSet newOther = (BiosSet)other;
// If the archive information matches

View File

@@ -124,7 +124,7 @@ namespace SabreTools.Helper
bool dupefound = false;
// If we don't have a rom, return false
if (_itemType == other.Type)
if (_itemType != other.Type)
{
return dupefound;
}

View File

@@ -127,13 +127,13 @@
public override bool Equals(DatItem other)
{
// If we don't have a rom, return false
if (_itemType == other.Type)
// If we don't have a release return false
if (_itemType != other.Type)
{
return false;
}
// Otherwise, treat it as a rom
// Otherwise, treat it as a reease
Release newOther = (Release)other;
// If the archive information matches

View File

@@ -145,7 +145,7 @@ namespace SabreTools.Helper
bool dupefound = false;
// If we don't have a rom, return false
if (_itemType == other.Type)
if (_itemType != other.Type)
{
return dupefound;
}

View File

@@ -73,13 +73,13 @@
public override bool Equals(DatItem other)
{
// If we don't have a rom, return false
if (_itemType == other.Type)
// If we don't have a sample, return false
if (_itemType != other.Type)
{
return false;
}
// Otherwise, treat it as a rom
// Otherwise, treat it as a sample
Sample newOther = (Sample)other;
// If the archive information matches