Modified StepsID operators to consider 0 equal to all other hash values. See comment in source for details. Changed operator>>(RString&, int&) functions to be based off a template.

This commit is contained in:
Kyzentun
2015-04-10 09:10:51 -06:00
parent 60349d849e
commit 1c3db82537
4 changed files with 45 additions and 13 deletions
+20 -1
View File
@@ -336,11 +336,30 @@ bool StepsID::operator<( const StepsID &rhs ) const
COMP(st);
COMP(dc);
COMP(sDescription);
COMP(uHash);
// See explanation in class declaration. -Kyz
if(uHash != 0 && rhs.uHash != 0)
{
COMP(uHash);
}
#undef COMP
return false;
}
bool StepsID::operator==(const StepsID &rhs) const
{
#define COMP(a) if(a != rhs.a) return false;
COMP(st);
COMP(dc);
COMP(sDescription);
// See explanation in class declaration. -Kyz
if(uHash != 0 && rhs.uHash != 0)
{
COMP(uHash);
}
#undef COMP
return true;
}
/*
* (c) 2001-2004 Chris Danford, Glenn Maynard
* All rights reserved.