diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2017-11-09 05:41:16 -0800 |
---|---|---|
committer | Garrett Brown <themagnificentmrb@gmail.com> | 2018-08-17 05:58:23 -0700 |
commit | 82f11573b3d6b00f5557bb2454e1ce73b2fc58bb (patch) | |
tree | 08dff20b20495875db49fe47da75d9c1a17fc2ba | |
parent | b96c8d571d7a9435f17f6054bebbafe653d03ec5 (diff) |
Silence compiler warning in Picture.cpp
Warning was:
xbmc/pictures/Picture.cpp: In static member function 'static bool CPicture::CreateThumbnailFromSurface(const unsigned char*, int, int, int, const string&)':
xbmc/pictures/Picture.cpp:93:87: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
const bool ret = file.OpenForWrite(thumbFile, true) && file.Write(thumb, thumbsize) == thumbsize;
^
-rw-r--r-- | xbmc/pictures/Picture.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xbmc/pictures/Picture.cpp b/xbmc/pictures/Picture.cpp index 4b754db2ca..426ec06f1e 100644 --- a/xbmc/pictures/Picture.cpp +++ b/xbmc/pictures/Picture.cpp @@ -76,7 +76,9 @@ bool CPicture::CreateThumbnailFromSurface(const unsigned char *buffer, int width } XFILE::CFile file; - const bool ret = file.OpenForWrite(thumbFile, true) && file.Write(thumb, thumbsize) == thumbsize; + const bool ret = file.OpenForWrite(thumbFile, true) && + file.Write(thumb, thumbsize) == static_cast<ssize_t>(thumbsize); + pImage->ReleaseThumbnailBuffer(); delete pImage; |