vcl/source/bitmap/BitmapProcessor.cxx | 8 ++++---- vcl/source/image/Image.cxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 28f21af7194c887f74190e6c6596fbaafc189e97 Author: Noel Grandin <[email protected]> Date: Mon Nov 23 15:19:40 2015 +0200 fix Image::operator== comparing the pointer values in std::unique_ptr's can never be true (since they cannot point at the same thing, by definition) Change-Id: I38eb6406b61d5a3662adb68ca1558248925d7e90 diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 33a5018..d224da1 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -221,8 +221,8 @@ bool Image::operator==(const Image& rImage) const bRet = true; else if (!rImage.mpImplData || !mpImplData) bRet = false; - else if (rImage.mpImplData->mpBitmapEx == mpImplData->mpBitmapEx) - bRet = (rImage.mpImplData->mpBitmapEx == mpImplData->mpBitmapEx); + else + bRet = *rImage.mpImplData->mpBitmapEx == *mpImplData->mpBitmapEx; return bRet; } commit 37605424f51c569d1b80c47a4d42366bf829e683 Author: Noel Grandin <[email protected]> Date: Mon Nov 23 15:10:37 2015 +0200 loplugin:loopvartoosmall Change-Id: I2aca12b994c2fd260803a8897b968ddac848f235 diff --git a/vcl/source/bitmap/BitmapProcessor.cxx b/vcl/source/bitmap/BitmapProcessor.cxx index 20f8121..44a0f7d 100644 --- a/vcl/source/bitmap/BitmapProcessor.cxx +++ b/vcl/source/bitmap/BitmapProcessor.cxx @@ -80,9 +80,9 @@ BitmapEx BitmapProcessor::createDisabledImage(const BitmapEx& rBitmapEx) BitmapColor aGreyValue(0); BitmapColor aGreyAlphaValue(0); - for (int nY = 0; nY < aSize.Height(); ++nY) + for (long nY = 0; nY < aSize.Height(); ++nY) { - for (int nX = 0; nX < aSize.Width(); ++nX) + for (long nX = 0; nX < aSize.Width(); ++nX) { aGreyValue.SetIndex(pRead->GetLuminance(nY, nX)); pGrey->SetPixel(nY, nX, aGreyValue); @@ -104,9 +104,9 @@ BitmapEx BitmapProcessor::createDisabledImage(const BitmapEx& rBitmapEx) BitmapColor aGreyValue(0); BitmapColor aGreyAlphaValue(0); - for (int nY = 0; nY < aSize.Height(); ++nY) + for (long nY = 0; nY < aSize.Height(); ++nY) { - for (int nX = 0; nX < aSize.Width(); ++nX) + for (long nX = 0; nX < aSize.Width(); ++nX) { aGreyValue.SetIndex(pRead->GetLuminance(nY, nX)); pGrey->SetPixel(nY, nX, aGreyValue); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
