Skip to content

Commit

Permalink
Use Matcher::compareHits in swapresults to ensure a deterministic sor…
Browse files Browse the repository at this point in the history
…ting
  • Loading branch information
milot-mirdita committed Sep 4, 2018
1 parent 925af80 commit 3c3dc6e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/util/swapresults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
#include <omp.h>
#endif

struct compareEval {
bool operator()(const Matcher::result_t &lhs,
const Matcher::result_t &rhs) const {
return lhs.eval < rhs.eval;
}
};

class IndexReader {
public:
DBReader<unsigned int> *reader;
Expand Down Expand Up @@ -318,7 +311,7 @@ int doswap(Parameters& par, bool isGeneralMode) {

if (curRes.empty() == false) {
if (curRes.size() > 1) {
std::sort(curRes.begin(), curRes.end(), compareEval());
std::sort(curRes.begin(), curRes.end(), Matcher::compareHits);
}

for (size_t j = 0; j < curRes.size(); j++) {
Expand Down

0 comments on commit 3c3dc6e

Please sign in to comment.