From 6e82ac31e42c872f86cd25908008c3e69b806e2f Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 26 Jan 2014 00:32:23 +0100 Subject: [PATCH] Revert "Fix compiler warnings (-Wconversion)" This reverts commit 8919d0aba0f9473a1c0f4ab110e907ef3712ebb2. I have a different, simpler version in my tree. Keep only the (unsigned char) cast in timerlist.cpp Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f625a18324824cc1a5cf4e140e27b6964bedad44 Author: Stefan Seyfried Date: 2014-01-26 (Sun, 26 Jan 2014) ------------------ This commit was generated by Migit --- src/gui/bedit/bouqueteditor_bouquets.cpp | 4 ++-- src/gui/bookmarkmanager.cpp | 5 +++-- src/gui/bouquetlist.cpp | 4 ++-- src/gui/eventlist.cpp | 4 ++-- src/gui/pictureviewer.cpp | 4 ++-- src/gui/timerlist.cpp | 4 ++-- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 804ccea25..b89218f4c 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -124,11 +124,11 @@ void CBEBouquetWidget::paint() if (sbc < 1) sbc = 1; - int sbh = ((sb - 4) * 1024) / sbc; + float sbh= (sb- 4)/ sbc; int sbs= (selected/listmaxshow); //scrollbar - frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); } void CBEBouquetWidget::paintHead() diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 3a0ccb791..56894699c 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -456,9 +456,10 @@ void CBookmarkManager::paint() int sbc= ((bookmarks.size()- 1)/ listmaxshow)+ 1; if (sbc < 1) sbc = 1; - int sbh = ((sb - 4) * 1024) / sbc; - frameBuffer->paintBoxRel(x+width-13, ypos+2+(page_nr*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + float sbh= (sb- 4)/ sbc; + + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(page_nr * sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); } paintFoot(); diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 10150efaa..f8846cdf8 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -634,8 +634,8 @@ void CBouquetList::paint() 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 sbh = ((sb - 4) * 1024) / sbc; + float sbh= (sb - 4)/ sbc; int sbs= (selected/listmaxshow); - frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); } diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 712174f44..8bdb1ddf0 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -921,10 +921,10 @@ void CNeutrinoEventList::paint(t_channel_id channel_id) if (sbc < 1) sbc = 1; - int sbh = ((sb - 4) * 1024) / sbc; + float sbh= (sb- 4)/ sbc; int sbs= (selected/listmaxshow); - frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); } diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index ceb216b61..af95d92c4 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -760,10 +760,10 @@ void CPictureViewerGui::paint() if (sbc < 1) sbc = 1; - int sbh = ((sb - 4) * 1024) / sbc; + float sbh= (sb- 4)/ sbc; int sbs= (selected/listmaxshow); - frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); paintFoot(); paintInfo(); diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 983c9d3c3..93732057e 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -917,9 +917,9 @@ void CTimerList::paint() frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); int sbc= ((timerlist.size()- 1)/ listmaxshow)+ 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, RADIUS_SMALL); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(page_nr * sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); } paintFoot();