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:
+20
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user