mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Eliminate some warnings
This commit is contained in:
parent
168973331c
commit
10f6d90f16
@ -69,7 +69,7 @@ const char* cChannelGroups::GetPrev(int group) {
|
|||||||
|
|
||||||
const char* cChannelGroups::GetNext(int group) {
|
const char* cChannelGroups::GetNext(int group) {
|
||||||
if (group > -1) {
|
if (group > -1) {
|
||||||
if ((group+1) < channelGroups.size())
|
if ((group+1) < (int)channelGroups.size())
|
||||||
return channelGroups[group+1].GetName();
|
return channelGroups[group+1].GetName();
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
@ -89,7 +89,7 @@ int cChannelGroups::GetNextGroupChannelNumber(const cChannel *channel) {
|
|||||||
int currentGroup = GetGroup(channel);
|
int currentGroup = GetGroup(channel);
|
||||||
if (currentGroup == -1)
|
if (currentGroup == -1)
|
||||||
return 0;
|
return 0;
|
||||||
if ((currentGroup+1) < channelGroups.size()) {
|
if ((currentGroup+1) < (int)channelGroups.size()) {
|
||||||
return channelGroups[currentGroup+1].StartChannel();
|
return channelGroups[currentGroup+1].StartChannel();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -10,8 +10,8 @@ private:
|
|||||||
int channel;
|
int channel;
|
||||||
cChannelGroups *channelGroups;
|
cChannelGroups *channelGroups;
|
||||||
int maxChannels;
|
int maxChannels;
|
||||||
int startTime;
|
long unsigned int startTime;
|
||||||
int timeout;
|
long unsigned int timeout;
|
||||||
cPixmap *pixmapBack;
|
cPixmap *pixmapBack;
|
||||||
cPixmap *pixmapText;
|
cPixmap *pixmapText;
|
||||||
void SetPixmaps(void);
|
void SetPixmaps(void);
|
||||||
|
32
grid.h
32
grid.h
@ -20,38 +20,38 @@ protected:
|
|||||||
bool hasTimer;
|
bool hasTimer;
|
||||||
bool hasSwitchTimer;
|
bool hasSwitchTimer;
|
||||||
bool intersects(cGrid *neighbor);
|
bool intersects(cGrid *neighbor);
|
||||||
virtual time_t Duration(void) {};
|
virtual time_t Duration(void) { return 0; };
|
||||||
virtual void drawText(void) {};
|
virtual void drawText(void) {};
|
||||||
bool dummy;
|
bool dummy;
|
||||||
public:
|
public:
|
||||||
cGrid(cChannelColumn *c);
|
cGrid(cChannelColumn *c);
|
||||||
virtual ~cGrid(void);
|
virtual ~cGrid(void);
|
||||||
cChannelColumn *column;
|
cChannelColumn *column;
|
||||||
virtual void SetViewportHeight() {};
|
virtual void SetViewportHeight(void) {};
|
||||||
virtual void PositionPixmap() {};
|
virtual void PositionPixmap(void) {};
|
||||||
virtual void setText(void) {};
|
virtual void setText(void) {};
|
||||||
void Draw();
|
void Draw(void);
|
||||||
void SetDirty() {dirty = true;};
|
void SetDirty(void) {dirty = true;};
|
||||||
void SetActive() {dirty = true; active = true;};
|
void SetActive(void) {dirty = true; active = true;};
|
||||||
void SetInActive() {dirty = true; active = false;};
|
void SetInActive(void) {dirty = true; active = false;};
|
||||||
void SetColor(bool color) {isColor1 = color;};
|
void SetColor(bool color) {isColor1 = color;};
|
||||||
bool IsColor1() {return isColor1;};
|
bool IsColor1(void) {return isColor1;};
|
||||||
bool isFirst(void);
|
bool isFirst(void);
|
||||||
virtual const cEvent *GetEvent() {};
|
virtual const cEvent *GetEvent(void) { return NULL; };
|
||||||
bool Match(time_t t);
|
bool Match(time_t t);
|
||||||
virtual time_t StartTime() {};
|
virtual time_t StartTime(void) { return 0; };
|
||||||
virtual time_t EndTime() {};
|
virtual time_t EndTime(void) { return 0; };
|
||||||
virtual void SetStartTime(time_t start) {};
|
virtual void SetStartTime(time_t start) {};
|
||||||
virtual void SetEndTime(time_t end) {};
|
virtual void SetEndTime(time_t end) {};
|
||||||
int calcOverlap(cGrid *neighbor);
|
int calcOverlap(cGrid *neighbor);
|
||||||
virtual void SetTimer() {};
|
virtual void SetTimer(void) {};
|
||||||
virtual void SetSwitchTimer() {};
|
virtual void SetSwitchTimer(void) {};
|
||||||
virtual cString getText(void) { return cString("");};
|
virtual cString getText(void) { return cString("");};
|
||||||
virtual cString getTimeString(void) { return cString("");};
|
virtual cString getTimeString(void) { return cString("");};
|
||||||
bool Active(void) { return active; };
|
bool Active(void) { return active; };
|
||||||
bool HasTimer() {return hasTimer;};
|
bool HasTimer(void) {return hasTimer;};
|
||||||
bool HasSwitchTimer() {return hasSwitchTimer;};
|
bool HasSwitchTimer(void) {return hasSwitchTimer;};
|
||||||
bool isDummy() { return dummy; };
|
bool isDummy(void) { return dummy; };
|
||||||
virtual void debug() {};
|
virtual void debug() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ cImage *cImageCache::GetLogo(const cChannel *channel) {
|
|||||||
} else {
|
} else {
|
||||||
bool success = LoadLogo(channel);
|
bool success = LoadLogo(channel);
|
||||||
if (success) {
|
if (success) {
|
||||||
if ((tvguideConfig.limitLogoCache) && (logoCache.size() >= tvguideConfig.numLogosMax)) {
|
if ((tvguideConfig.limitLogoCache) && ((int)logoCache.size() >= tvguideConfig.numLogosMax)) {
|
||||||
//logo cache is full, don't cache anymore
|
//logo cache is full, don't cache anymore
|
||||||
if (tempStaticLogo) {
|
if (tempStaticLogo) {
|
||||||
delete tempStaticLogo;
|
delete tempStaticLogo;
|
||||||
|
@ -173,7 +173,7 @@ void cImageLoader::CreateGradient(tColor back, tColor blend, int width, int heig
|
|||||||
for (int x = 0; x < width; x++) {
|
for (int x = 0; x < width; x++) {
|
||||||
for (int y = 0; y < height; y++) {
|
for (int y = 0; y < height; y++) {
|
||||||
PixelPacket *pixel = pixels + y * width + x;
|
PixelPacket *pixel = pixels + y * width + x;
|
||||||
int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
|
unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
|
||||||
pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB;
|
pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ void cImageMagickWrapper::CreateGradient(tColor back, tColor blend, int width, i
|
|||||||
for (int x = 0; x < width; x++) {
|
for (int x = 0; x < width; x++) {
|
||||||
for (int y = 0; y < height; y++) {
|
for (int y = 0; y < height; y++) {
|
||||||
PixelPacket *pixel = pixels + y * width + x;
|
PixelPacket *pixel = pixels + y * width + x;
|
||||||
int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
|
unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
|
||||||
pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB;
|
pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ cRecMenuItem *cRecMenuAskFolder::GetMenuItem(int number) {
|
|||||||
if (number == 0) {
|
if (number == 0) {
|
||||||
cRecMenuItem *result = new cRecMenuItemButton(tr("root video folder"), rmsInstantRecord, false, false, true);
|
cRecMenuItem *result = new cRecMenuItemButton(tr("root video folder"), rmsInstantRecord, false, false, true);
|
||||||
return result;
|
return result;
|
||||||
} else if ((number > 0) && (number < folders.size()+1)) {
|
} else if ((number > 0) && (number < (int)folders.size() + 1)) {
|
||||||
cRecMenuItem *result = new cRecMenuItemButton(folders[number-1].c_str(), rmsInstantRecord, false, false, true);
|
cRecMenuItem *result = new cRecMenuItemButton(folders[number-1].c_str(), rmsInstantRecord, false, false, true);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ int cRecMenuAskFolder::GetTotalNumMenuItems(void) {
|
|||||||
std::string cRecMenuAskFolder::GetFolder(void) {
|
std::string cRecMenuAskFolder::GetFolder(void) {
|
||||||
std::string folder = "";
|
std::string folder = "";
|
||||||
int folderActive = GetActive();
|
int folderActive = GetActive();
|
||||||
if (folderActive > 0 && folderActive < folders.size() + 1)
|
if (folderActive > 0 && folderActive < (int)folders.size() + 1)
|
||||||
folder = folders[folderActive - 1];
|
folder = folders[folderActive - 1];
|
||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
@ -275,7 +275,7 @@ cRecMenuTimerConflict::cRecMenuTimerConflict(cTVGuideTimerConflict *conflict) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cRecMenuItem *cRecMenuTimerConflict::GetMenuItem(int number) {
|
cRecMenuItem *cRecMenuTimerConflict::GetMenuItem(int number) {
|
||||||
if ((number >= 0) && (number < conflict->timerIDs.size())) {
|
if ((number >= 0) && (number < (int)conflict->timerIDs.size())) {
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
const cTimer *timer = Timers->Get(conflict->timerIDs[number]);
|
const cTimer *timer = Timers->Get(conflict->timerIDs[number]);
|
||||||
@ -677,7 +677,7 @@ int cRecMenuSearchTimerTemplates::GetTotalNumMenuItems(void) {
|
|||||||
TVGuideEPGSearchTemplate cRecMenuSearchTimerTemplates::GetTemplate(void) {
|
TVGuideEPGSearchTemplate cRecMenuSearchTimerTemplates::GetTemplate(void) {
|
||||||
TVGuideEPGSearchTemplate templ;
|
TVGuideEPGSearchTemplate templ;
|
||||||
int tmplActive = GetActive() - 1;
|
int tmplActive = GetActive() - 1;
|
||||||
if (tmplActive >= 0 && tmplActive < templates.size())
|
if (tmplActive >= 0 && tmplActive < (int)templates.size())
|
||||||
templ = templates[tmplActive];
|
templ = templates[tmplActive];
|
||||||
return templ;
|
return templ;
|
||||||
}
|
}
|
||||||
|
3
view.c
3
view.c
@ -122,7 +122,6 @@ void cView::DrawHeader(void) {
|
|||||||
//REC Icon
|
//REC Icon
|
||||||
eTimerMatch timerMatch=tmNone;
|
eTimerMatch timerMatch=tmNone;
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
// LOCK_TIMERS_READ;
|
|
||||||
const cTimer *ti;
|
const cTimer *ti;
|
||||||
#else
|
#else
|
||||||
cTimer *ti;
|
cTimer *ti;
|
||||||
@ -284,7 +283,7 @@ void cView::CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapper *twFu
|
|||||||
std::stringstream sstrTextTall;
|
std::stringstream sstrTextTall;
|
||||||
std::stringstream sstrTextFull;
|
std::stringstream sstrTextFull;
|
||||||
|
|
||||||
for (int i=0; i<flds.size(); i++) {
|
for (int i = 0; i < (int)flds.size(); i++) {
|
||||||
if (!flds[i].size()) {
|
if (!flds[i].size()) {
|
||||||
//empty line
|
//empty line
|
||||||
linesDrawn++;
|
linesDrawn++;
|
||||||
|
Loading…
Reference in New Issue
Block a user