Remove unecessary asserts
authorAlan Alpert <alan.alpert@nokia.com>
Mon, 16 Jan 2012 09:01:36 +0000 (19:01 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 23 Jan 2012 06:38:34 +0000 (07:38 +0100)
They would also trigger when the user gives invalid input, which is not
an assert worthy circumstance.

Change-Id: Ifa5697d411793a55b6895945e751a73841b1ba3f
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>

src/quick/items/qquickspriteengine.cpp

index b48fc71..bf9d33b 100644 (file)
@@ -273,7 +273,6 @@ QImage QQuickSpriteEngine::assembledImage()
             while (framesLeft > 0){
                 if (image.width() - x + curX <= img.width()){//finish a row in image (dest)
                     int copied = image.width() - x;
-                    Q_ASSERT(!(copied % frameWidth));//XXX: Just checking
                     framesLeft -= copied/frameWidth;
                     p.drawImage(x,y,img.copy(curX,curY,copied,frameHeight));
                     y += frameHeight;
@@ -285,7 +284,6 @@ QImage QQuickSpriteEngine::assembledImage()
                     }
                 }else{//finish a row in img (src)
                     int copied = img.width() - curX;
-                    Q_ASSERT(!(copied % frameWidth));//XXX: Just checking
                     framesLeft -= copied/frameWidth;
                     p.drawImage(x,y,img.copy(curX,curY,copied,frameHeight));
                     curY += frameHeight;