annotate pointpair.cpp @ 507:e7fd50483311

Free bits of the datum constructed in audioDB::query. We're not quite safe: error calls between allocation of some of these bits and pieces and their use will cause failure... but not freeing things here is definitely wrong.
author mas01cr
date Tue, 13 Jan 2009 21:37:10 +0000
parents 342822c2d49a
children cc2b97d020b1
rev   line source
mas01cr@498 1 #include "audioDB.h"
mas01cr@498 2 extern "C" {
mas01cr@498 3 #include "audioDB_API.h"
mas01cr@498 4 #include "audioDB-internals.h"
mas01cr@498 5 }
mas01cr@498 6
mas01cr@498 7 PointPair::PointPair(Uns32T a, Uns32T b, Uns32T c) :
mas01cr@498 8 trackID(a), qpos(b), spos(c) {
mas01cr@498 9 };
mas01cr@498 10
mas01cr@498 11 bool operator<(const PointPair& a, const PointPair& b) {
mas01cr@498 12 return ((a.trackID < b.trackID) ||
mas01cr@498 13 ((a.trackID == b.trackID) &&
mas01cr@498 14 ((a.spos < b.spos) || ((a.spos == b.spos) && (a.qpos < b.qpos)))));
mas01cr@498 15 }
mas01cr@498 16
mas01cr@498 17 bool operator>(const PointPair& a, const PointPair& b) {
mas01cr@498 18 return ((a.trackID > b.trackID) ||
mas01cr@498 19 ((a.trackID == b.trackID) &&
mas01cr@498 20 ((a.spos > b.spos) || ((a.spos == b.spos) && (a.qpos > b.qpos)))));
mas01cr@498 21 }
mas01cr@498 22
mas01cr@498 23 bool operator==(const PointPair& a, const PointPair& b) {
mas01cr@498 24 return ((a.trackID == b.trackID) &&
mas01cr@498 25 (a.qpos == b.qpos) &&
mas01cr@498 26 (a.spos == b.spos));
mas01cr@498 27 }