Fix compiler warnings (-Wconversion)

- THX SatBaby for the info
This commit is contained in:
M. Liebmann
2014-01-25 21:11:34 +01:00
parent 4b6d2d310c
commit cd5fd9dab3
6 changed files with 14 additions and 15 deletions

View File

@@ -124,11 +124,11 @@ void CBEBouquetWidget::paint()
if (sbc < 1) if (sbc < 1)
sbc = 1; sbc = 1;
float sbh= (sb- 4)/ sbc; int sbh = ((sb - 4) * 1024) / sbc;
int sbs= (selected/listmaxshow); int sbs= (selected/listmaxshow);
//scrollbar //scrollbar
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3);
} }
void CBEBouquetWidget::paintHead() void CBEBouquetWidget::paintHead()

View File

@@ -456,10 +456,9 @@ void CBookmarkManager::paint()
int sbc= ((bookmarks.size()- 1)/ listmaxshow)+ 1; int sbc= ((bookmarks.size()- 1)/ listmaxshow)+ 1;
if (sbc < 1) if (sbc < 1)
sbc = 1; sbc = 1;
int sbh = ((sb - 4) * 1024) / sbc;
float sbh= (sb- 4)/ sbc; frameBuffer->paintBoxRel(x+width-13, ypos+2+(page_nr*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3);
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(page_nr * sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3);
} }
paintFoot(); paintFoot();

View File

@@ -634,8 +634,8 @@ void CBouquetList::paint()
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1);
int sbc= ((bsize - 1)/ listmaxshow)+ 1; /* bsize is > 0, so sbc is also > 0 */ int sbc= ((bsize - 1)/ listmaxshow)+ 1; /* bsize is > 0, so sbc is also > 0 */
float sbh= (sb - 4)/ sbc; int sbh = ((sb - 4) * 1024) / sbc;
int sbs= (selected/listmaxshow); int sbs= (selected/listmaxshow);
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3);
} }

View File

@@ -921,10 +921,10 @@ void CNeutrinoEventList::paint(t_channel_id channel_id)
if (sbc < 1) if (sbc < 1)
sbc = 1; sbc = 1;
float sbh= (sb- 4)/ sbc; int sbh = ((sb - 4) * 1024) / sbc;
int sbs= (selected/listmaxshow); int sbs= (selected/listmaxshow);
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3);
} }

View File

@@ -760,10 +760,10 @@ void CPictureViewerGui::paint()
if (sbc < 1) if (sbc < 1)
sbc = 1; sbc = 1;
float sbh= (sb- 4)/ sbc; int sbh = ((sb - 4) * 1024) / sbc;
int sbs= (selected/listmaxshow); int sbs= (selected/listmaxshow);
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3);
paintFoot(); paintFoot();
paintInfo(); paintInfo();

View File

@@ -285,8 +285,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
if (timer_apids_dflt) if (timer_apids_dflt)
timerlist[selected].apids = TIMERD_APIDS_CONF; timerlist[selected].apids = TIMERD_APIDS_CONF;
else else
timerlist[selected].apids = (timer_apids_std * TIMERD_APIDS_STD) | (timer_apids_ac3 * TIMERD_APIDS_AC3) | timerlist[selected].apids = (unsigned char)((timer_apids_std * TIMERD_APIDS_STD) | (timer_apids_ac3 * TIMERD_APIDS_AC3) |
(timer_apids_alt * TIMERD_APIDS_ALT); (timer_apids_alt * TIMERD_APIDS_ALT));
Timer->modifyTimerAPid(timerlist[selected].eventID,timerlist[selected].apids); Timer->modifyTimerAPid(timerlist[selected].eventID,timerlist[selected].apids);
Timer->modifyRecordTimerEvent(timerlist[selected].eventID, timerlist[selected].announceTime, Timer->modifyRecordTimerEvent(timerlist[selected].eventID, timerlist[selected].announceTime,
timerlist[selected].alarmTime, timerlist[selected].alarmTime,
@@ -917,9 +917,9 @@ void CTimerList::paint()
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1);
int sbc= ((timerlist.size()- 1)/ listmaxshow)+ 1; int sbc= ((timerlist.size()- 1)/ listmaxshow)+ 1;
float sbh= (sb- 4)/ sbc; int sbh = ((sb - 4) * 1024) / sbc;
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(page_nr * sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); frameBuffer->paintBoxRel(x+width-13, ypos+2+(page_nr*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL);
} }
paintFoot(); paintFoot();