Oops. Fix the job run order.

This commit is contained in:
JoelKatz
2013-01-11 18:12:42 -08:00
parent 35721a73e2
commit c88c7c50a8

View File

@@ -60,7 +60,7 @@ bool Job::operator>(const Job& j) const
return true;
if (mType > j.mType)
return false;
return mJobIndex < j.mJobIndex;
return mJobIndex > j.mJobIndex;
}
bool Job::operator>=(const Job& j) const
@@ -69,7 +69,7 @@ bool Job::operator>=(const Job& j) const
return true;
if (mType > j.mType)
return false;
return mJobIndex <= j.mJobIndex;
return mJobIndex >= j.mJobIndex;
}
bool Job::operator<(const Job& j) const
@@ -78,7 +78,7 @@ bool Job::operator<(const Job& j) const
return false;
if (mType > j.mType)
return true;
return mJobIndex > j.mJobIndex;
return mJobIndex < j.mJobIndex;
}
bool Job::operator<=(const Job& j) const
@@ -87,7 +87,7 @@ bool Job::operator<=(const Job& j) const
return false;
if (mType > j.mType)
return true;
return mJobIndex >= j.mJobIndex;
return mJobIndex <= j.mJobIndex;
}
void JobQueue::addJob(JobType type, const boost::function<void(Job&)>& jobFunc)