From f78bcc297f12c5d1f8835090049ceb571e10b451 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 16 Apr 2016 20:00:32 +0200 Subject: [PATCH] dvbsubtitle.cpp: fix wconversion compiler warnings Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d9aab3ed812643f5547c35a83b457d7e83861395 Author: Thilo Graf Date: 2016-04-16 (Sat, 16 Apr 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- lib/libdvbsub/dvbsubtitle.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index d480f6299..0be467e10 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -119,7 +119,7 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y) double xc = (double) CFrameBuffer::getInstance()->getScreenWidth(true)/(double) 720; double yc = (double) CFrameBuffer::getInstance()->getScreenHeight(true)/(double) 576; xc = yc; //FIXME should we scale also to full width ? - int xf = xc * (double) 720; + int xf = int(xc * (double) 720); for (i = 0; i < Count(); i++) { uint32_t * colors = (uint32_t *) sub.rects[i]->pict.data[1]; @@ -127,15 +127,15 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y) int height = sub.rects[i]->h; int xoff, yoff; - int nw = width == 1280 ? ((double) width / xc) : ((double) width * xc); - int nh = (double) height * yc; + int nw = int(width == 1280 ? ((double) width / xc) : ((double) width * xc)); + int nh = int((double) height * yc); int xdiff = (wd > xf) ? ((wd - xf) / 2) : 0; - xoff = sub.rects[i]->x*xc + xstart + xdiff; + xoff = int(sub.rects[i]->x*xc + xstart + xdiff); if(sub.rects[i]->y < 576/2) { - yoff = ystart + sub.rects[i]->y*yc; + yoff = int(ystart + sub.rects[i]->y*yc); } else { - yoff = yend - ((width == 1280 ? 704:576) - (double) (sub.rects[i]->y + height))*yc - nh; + yoff = int(yend - ((width == 1280 ? 704:576) - (double) (sub.rects[i]->y + height))*yc - nh); if(yoff < ystart) yoff = ystart; } @@ -343,7 +343,7 @@ int cDvbSubtitleConverter::Action(void) bitmaps->Del(sb, true); } else if (Delta < WaitMs) - WaitMs = (Delta > SHOW_DELTA) ? Delta - SHOW_DELTA : Delta; + WaitMs = int((Delta > SHOW_DELTA) ? Delta - SHOW_DELTA : Delta); } else bitmaps->Del(sb, true);