- Fixed bug that caused Att::match to assume a Date was not already
  converted to an epoch.
This commit is contained in:
Paul Beckingham 2009-06-26 00:05:33 -04:00
parent 53155fcc34
commit 0440189b1d
2 changed files with 6 additions and 8 deletions

View file

@ -236,7 +236,6 @@ bool Att::validNameValue (
autoComplete (name, candidates, matches);
if (matches.size () == 0)
// throw std::string ("Unrecognized attribute '") + name + "'";
return false;
else if (matches.size () != 1)
@ -559,7 +558,7 @@ bool Att::match (const Att& other) const
}
else if (which == "date")
{
Date literal (mValue);
Date literal ((time_t)::atoi (mValue.c_str ()));
Date variable ((time_t)::atoi (other.mValue.c_str ()));
if (! (variable < literal))
return false;
@ -589,7 +588,7 @@ bool Att::match (const Att& other) const
}
else if (which == "date")
{
Date literal (mValue);
Date literal ((time_t)::atoi (mValue.c_str ()));
Date variable ((time_t)::atoi (other.mValue.c_str ()));
if (! (variable > literal))
return false;