From: leslie Date: Fri, 25 Jul 2008 09:07:55 +0000 (+0800) Subject: constcw: fix key compare X-Git-Tag: 0.9.1~49 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=3b6090d83229229610dc5f5ae4a57751d5a3dc9c;p=sasc-ng.git constcw: fix key compare --- diff --git a/systems/constcw/constcw.c b/systems/constcw/constcw.c index 8a37fa6..aa95ee1 100644 --- a/systems/constcw/constcw.c +++ b/systems/constcw/constcw.c @@ -44,6 +44,7 @@ private: int freq; char pol; protected: + virtual bool Cmp(cPlainKey *k); virtual int IdSize(void) { return 4; } virtual cString PrintKeyNr(void); public: @@ -60,6 +61,12 @@ cPlainKeyConstCw::cPlainKeyConstCw(bool Super) freq=-1; } +bool cPlainKeyConstCw::Cmp(cPlainKey *k) +{ + cPlainKeyConstCw *ck=dynamic_cast(k); // downcast + return ck && prgId==ck->prgId && source==ck->source && freq==ck->freq && pol==ck->pol && cHexKey::Cmp(k); +} + bool cPlainKeyConstCw::Matches(const cEcmInfo *ecm) { return ecm->prgId==prgId && ecm->source==source && ecm->transponder==transponder;