Permalink
Browse files

fixed: silence signed / unsigned int comparison

  • Loading branch information...
1 parent a25d75a commit 60b0903f6ee3c832b2ef2ea44f40175eb251d741 @mkortstiege mkortstiege committed Jul 5, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 xbmc/pictures/Picture.cpp
  2. +1 −1 xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
@@ -89,7 +89,7 @@ bool CPicture::CacheTexture(uint8_t *pixels, uint32_t width, uint32_t height, ui
uint32_t max_height = g_advancedSettings.m_imageRes;
if (g_advancedSettings.m_fanartRes > g_advancedSettings.m_imageRes)
{ // a separate fanart resolution is specified - check if the image is exactly equal to this res
- if (width == g_advancedSettings.m_fanartRes * 16/9 && height == g_advancedSettings.m_fanartRes)
+ if (width == (unsigned int)g_advancedSettings.m_fanartRes * 16/9 && height == (unsigned int)g_advancedSettings.m_fanartRes)
{ // special case for fanart res
max_height = g_advancedSettings.m_fanartRes;
}
@@ -253,7 +253,7 @@ void CGUIDialogVideoBookmarks::AddBookmark(CVideoInfoTag* tag)
#endif
int width = BOOKMARK_THUMB_WIDTH;
int height = (int)(BOOKMARK_THUMB_WIDTH / aspectRatio);
- if (height > BOOKMARK_THUMB_WIDTH)
+ if (height > (int)BOOKMARK_THUMB_WIDTH)
{
height = BOOKMARK_THUMB_WIDTH;
width = (int)(BOOKMARK_THUMB_WIDTH * aspectRatio);

3 comments on commit 60b0903

Contributor

huceke replied Jul 5, 2012

Wouldn't it be better to make the image width and height unsigned instead of the cast ?

Member

mkortstiege replied Jul 5, 2012

Yea, thought about this as well right after pushing. @jmarshallnz what do you think?

Member

jmarshallnz replied Jul 5, 2012

You can, sure - it means you have to update the renderer as well though I think.

Please sign in to comment.