]> www.vanbest.org Git - sasc-ng.git/commitdiff
constcw: fix key compare
authorleslie <unknown>
Fri, 25 Jul 2008 09:07:55 +0000 (17:07 +0800)
committerleslie <unknown>
Fri, 25 Jul 2008 09:07:55 +0000 (17:07 +0800)
systems/constcw/constcw.c

index 8a37fa643484c9ac4a8654d4d89efc9a4cef6931..aa95ee12168118c4ec46a555ab7c5a9d9b42401f 100644 (file)
@@ -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<cPlainKeyConstCw *>(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;