Mercurial > hg > audiodb
diff reporter.h @ 275:d209e8470a60
fixed bug in Radius reporters where *worst* n tracks were being reporter, needed std::greater<Radresult> in priority_queue
author | mas01mc |
---|---|
date | Mon, 30 Jun 2008 17:38:59 +0000 |
parents | 1cec738101a8 |
children | d9a88cfd4ab6 |
line wrap: on
line diff
--- 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<Radresult>, std::greater<Radresult> > 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<Radresult>, std::greater<Radresult> > result; // KLUDGE: doing this backwards in an attempt to get the same // tiebreak behaviour as before. for (int i = numFiles-1; i >= 0; i--) {