annotate pointpair.cpp @ 497:9d8aee621afb api-inversion

More libtests fixups. Include audiodb_close() calls everywhere (whoops). Add the facility to run tests under valgrind. Unfortunately the error-exitcode flag doesn't actually cause an error exit if the only thing wrong is memory leaks, but it will if there are actual memory errors, which is a start.
author mas01cr
date Sat, 10 Jan 2009 16:07:43 +0000
parents 8fb85fbcaba6
children cc2b97d020b1
rev   line source
mas01cr@496 1 #include "audioDB.h"
mas01cr@496 2 extern "C" {
mas01cr@496 3 #include "audioDB_API.h"
mas01cr@496 4 #include "audioDB-internals.h"
mas01cr@496 5 }
mas01cr@496 6
mas01cr@496 7 PointPair::PointPair(Uns32T a, Uns32T b, Uns32T c) :
mas01cr@496 8 trackID(a), qpos(b), spos(c) {
mas01cr@496 9 };
mas01cr@496 10
mas01cr@496 11 bool operator<(const PointPair& a, const PointPair& b) {
mas01cr@496 12 return ((a.trackID < b.trackID) ||
mas01cr@496 13 ((a.trackID == b.trackID) &&
mas01cr@496 14 ((a.spos < b.spos) || ((a.spos == b.spos) && (a.qpos < b.qpos)))));
mas01cr@496 15 }
mas01cr@496 16
mas01cr@496 17 bool operator>(const PointPair& a, const PointPair& b) {
mas01cr@496 18 return ((a.trackID > b.trackID) ||
mas01cr@496 19 ((a.trackID == b.trackID) &&
mas01cr@496 20 ((a.spos > b.spos) || ((a.spos == b.spos) && (a.qpos > b.qpos)))));
mas01cr@496 21 }
mas01cr@496 22
mas01cr@496 23 bool operator==(const PointPair& a, const PointPair& b) {
mas01cr@496 24 return ((a.trackID == b.trackID) &&
mas01cr@496 25 (a.qpos == b.qpos) &&
mas01cr@496 26 (a.spos == b.spos));
mas01cr@496 27 }