- fbx: accidentially passed a wrong predicate for sorting Connections to std::sort.

pull/14/head
Alexander Gessler 2012-07-05 17:18:54 +02:00
parent 4db113395c
commit d6e929b670
2 changed files with 6 additions and 2 deletions

View File

@ -642,7 +642,7 @@ std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_
temp.push_back((*it).second); temp.push_back((*it).second);
} }
std::sort(temp.begin(), temp.end(), std::mem_fun(&Connection::CompareTo)); std::sort(temp.begin(), temp.end(), std::mem_fun(&Connection::Compare));
return temp; // NRVO should handle this return temp; // NRVO should handle this
} }
@ -661,7 +661,7 @@ std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(ui
temp.push_back((*it).second); temp.push_back((*it).second);
} }
std::sort(temp.begin(), temp.end(), std::mem_fun(&Connection::CompareTo)); std::sort(temp.begin(), temp.end(), std::mem_fun(&Connection::Compare));
return temp; // NRVO should handle this return temp; // NRVO should handle this
} }

View File

@ -439,6 +439,10 @@ public:
return 0; return 0;
} }
bool Compare(const Connection* c) const {
return InsertionOrder() < c->InsertionOrder();
}
public: public:
uint64_t insertionOrder; uint64_t insertionOrder;