# HG changeset patch # User mas01mc # Date 1214847539 0 # Node ID d209e8470a6001be3508d3726092efbc566225da # Parent 1cec738101a86e8648372df39351fbf1202dab45 fixed bug in Radius reporters where *worst* n tracks were being reporter, needed std::greater in priority_queue diff -r 1cec738101a8 -r d209e8470a60 reporter.h --- a/reporter.h Tue Jun 10 16:22:52 2008 +0000 +++ b/reporter.h Mon Jun 30 17:38:59 2008 +0000 @@ -28,6 +28,10 @@ return a.count < b.count; } +bool operator> (const Radresult &a, const Radresult &b) { + return a.count > b.count; +} + class Reporter { public: virtual ~Reporter() {}; @@ -254,7 +258,7 @@ } void trackSequenceQueryRadReporter::report(char *fileTable, adb__queryResponse *adbQueryResponse) { - std::priority_queue < Radresult > result; + std::priority_queue < Radresult, std::vector, std::greater > result; // KLUDGE: doing this backwards in an attempt to get the same // tiebreak behaviour as before. for (int i = numFiles-1; i >= 0; i--) { @@ -448,7 +452,7 @@ } void trackSequenceQueryRadNNReporter::report(char *fileTable, adb__queryResponse *adbQueryResponse) { - std::priority_queue < Radresult > result; + std::priority_queue < Radresult, std::vector, std::greater > result; // KLUDGE: doing this backwards in an attempt to get the same // tiebreak behaviour as before. for (int i = numFiles-1; i >= 0; i--) {