Bug Fix - Att::match

- Fixed Att::match bug that succeeded when no modifiers were present.
This commit is contained in:
Paul Beckingham 2009-06-07 22:57:14 -04:00
parent 9d48faa759
commit cf67e0142c
3 changed files with 10 additions and 19 deletions

View file

@ -194,6 +194,11 @@ bool Att::validMod (const std::string& mod) const
// Record that does not have modifiers, but may have a value.
bool Att::match (const Att& other) const
{
// If there are no mods, just perform a straight compares on value.
if (mMods.size () == 0)
if (mName != other.mName || mValue != other.mValue)
return false;
// Assume a match, and short-circuit on mismatch.
foreach (mod, mMods)
{