From c6d6a8876bf8044ef332b10ef074a8159a061878 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Thu, 13 Mar 2014 14:35:31 +0400 Subject: [PATCH] zapit/src/bouquets.cpp: use INVALID_SAT_POSITION instead of -1 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7d48b6c1f9ad1201e78681e079003daef2c1b753 Author: [CST] Focus Date: 2014-03-13 (Thu, 13 Mar 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/zapit/include/zapit/bouquets.h | 2 +- src/zapit/src/bouquets.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zapit/include/zapit/bouquets.h b/src/zapit/include/zapit/bouquets.h index 33b483fc7..82567133c 100644 --- a/src/zapit/include/zapit/bouquets.h +++ b/src/zapit/include/zapit/bouquets.h @@ -105,7 +105,7 @@ class CBouquetManager void saveBouquets(void); void saveUBouquets(void); - void saveBouquets(const CZapitClient::bouquetMode bouquetMode, const char * const providerName, t_satellite_position satellitePosition = -1); + void saveBouquets(const CZapitClient::bouquetMode bouquetMode, const char * const providerName, t_satellite_position satellitePosition = INVALID_SAT_POSITION); void loadBouquets(bool ignoreBouquetFile = false); void renumServices(); diff --git a/src/zapit/src/bouquets.cpp b/src/zapit/src/bouquets.cpp index 5cf329e58..6ee45ec10 100644 --- a/src/zapit/src/bouquets.cpp +++ b/src/zapit/src/bouquets.cpp @@ -283,7 +283,7 @@ void CBouquetManager::saveBouquets(const CZapitClient::bouquetMode bouquetMode, { if (bouquetMode == CZapitClient::BM_DELETEBOUQUETS) { INFO("removing existing bouquets"); - if (satellitePosition > 0) { + if (satellitePosition != INVALID_SAT_POSITION) { if (CFEManager::getInstance()->cableOnly()) g_bouquetManager->clearAll(false); else @@ -420,7 +420,7 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser) if(!bUser) { /* set satellite position for provider bouquets. reset position to 0, if position not match - means mixed bouquet */ - if (newBouquet->satellitePosition < 0) + if (newBouquet->satellitePosition == INVALID_SAT_POSITION) newBouquet->satellitePosition = satellitePosition; else if (newBouquet->satellitePosition != satellitePosition) newBouquet->satellitePosition = 0; @@ -515,7 +515,7 @@ CZapitBouquet* CBouquetManager::addBouquet(const std::string & name, bool ub, bo newBouquet->bUser = ub; newBouquet->bFav = myfav; newBouquet->bOther = false; - newBouquet->satellitePosition = -1; + newBouquet->satellitePosition = INVALID_SAT_POSITION; //printf("CBouquetManager::addBouquet: %s, user %s\n", name.c_str(), ub ? "YES" : "NO"); if(ub) { @@ -681,7 +681,7 @@ void CBouquetManager::deletePosition(t_satellite_position satellitePosition) BouquetList tmplist; for (unsigned int i =0; i < Bouquets.size(); i++) { if (satellitePosition == Bouquets[i]->satellitePosition) { -printf("CBouquetManager::deletePosition: delete [%s]\n", Bouquets[i]->Name.c_str()); + printf("CBouquetManager::deletePosition: delete [%s]\n", Bouquets[i]->Name.c_str()); delete Bouquets[i]; } else tmplist.push_back(Bouquets[i]);