[Fix][bluray/geometry] Fix compiler warning about float -> int and int -> float conve...
authorace20022 <ace20022@ymail.com>
Wed, 15 Jan 2014 21:59:48 +0000 (22:59 +0100)
committerace20022 <ace20022@ymail.com>
Sat, 25 Jan 2014 16:05:48 +0000 (17:05 +0100)
xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
xbmc/guilib/Geometry.h

index c02edda..da16b1e 100644 (file)
@@ -695,7 +695,7 @@ void CDVDInputStreamBluray::OverlayInit(SPlane& plane, int w, int h)
 void CDVDInputStreamBluray::OverlayClear(SPlane& plane, int x, int y, int w, int h)
 {
 #if(BD_OVERLAY_INTERFACE_VERSION >= 2)
-  CRect ovr(x
+  CRectInt ovr(x
           , y
           , x + w
           , y + h);
@@ -703,12 +703,12 @@ void CDVDInputStreamBluray::OverlayClear(SPlane& plane, int x, int y, int w, int
   /* fixup existing overlays */
   for(SOverlays::iterator it = plane.o.begin(); it != plane.o.end();)
   {
-    CRect old((*it)->x
+    CRectInt old((*it)->x
             , (*it)->y
             , (*it)->x + (*it)->width
             , (*it)->y + (*it)->height);
 
-    vector<CRect> rem = old.SubtractRect(ovr);
+    vector<CRectInt> rem = old.SubtractRect(ovr);
 
     /* if no overlap we are done */
     if(rem.size() == 1 && !(rem[0] != old))
@@ -718,7 +718,7 @@ void CDVDInputStreamBluray::OverlayClear(SPlane& plane, int x, int y, int w, int
     }
 
     SOverlays add;
-    for(vector<CRect>::iterator itr = rem.begin(); itr != rem.end(); ++itr)
+    for(vector<CRectInt>::iterator itr = rem.begin(); itr != rem.end(); ++itr)
     {
       SOverlay overlay(new CDVDOverlayImage(*(*it)
                                             , itr->x1
index a7c1229..0b92ffd 100644 (file)
@@ -260,7 +260,7 @@ public:
 
   T x1, y1, x2, y2;
 private:
-  inline static float clamp_range(T x, T l, T h) XBMC_FORCE_INLINE
+  inline static T clamp_range(T x, T l, T h) XBMC_FORCE_INLINE
   {
     return (x > h) ? h : ((x < l) ? l : x);
   }