This commit is contained in:
Vitor Santos Costa 2013-04-16 21:09:58 +01:00
commit 9b4b33bb3c
2 changed files with 25 additions and 12 deletions

View File

@ -21,6 +21,16 @@ enum class LogVarType {
negLvt
};
// Workaround GCC bug #38064
inline bool operator< (LogVarType lvt1, LogVarType lvt2)
{
return (int)lvt1 < (int)lvt2;
}
typedef long LiteralId;
typedef std::vector<LogVarType> LogVarTypes;

View File

@ -118,21 +118,24 @@ ParfactorList::isAllShattered() const
struct sortByParams {
bool operator() (const Parfactor* pf1, const Parfactor* pf2) const
{
if (pf1->params().size() < pf2->params().size()) {
return true;
} else if (pf1->params().size() == pf2->params().size() &&
pf1->params() < pf2->params()) {
return true;
}
return false;
}
};
void
ParfactorList::print() const
{
struct sortByParams {
bool operator() (const Parfactor* pf1, const Parfactor* pf2)
{
if (pf1->params().size() < pf2->params().size()) {
return true;
} else if (pf1->params().size() == pf2->params().size() &&
pf1->params() < pf2->params()) {
return true;
}
return false;
}
};
Parfactors pfVec (pfList_.begin(), pfList_.end());
std::sort (pfVec.begin(), pfVec.end(), sortByParams());
for (size_t i = 0; i < pfVec.size(); i++) {