Define sortByParams as a local class

This commit is contained in:
Tiago Gomes 2013-02-22 12:35:14 +00:00
parent 0991a84793
commit c8b639f495
1 changed files with 12 additions and 19 deletions

View File

@ -118,8 +118,9 @@ ParfactorList::isAllShattered (void) const
namespace {
void
ParfactorList::print (void) const
{
struct sortByParams {
bool operator() (const Parfactor* pf1, const Parfactor* pf2)
{
@ -132,14 +133,6 @@ struct sortByParams {
return false;
}
};
}
void
ParfactorList::print (void) const
{
Parfactors pfVec (pfList_.begin(), pfList_.end());
std::sort (pfVec.begin(), pfVec.end(), sortByParams());
for (size_t i = 0; i < pfVec.size(); i++) {