resize_test: fix implicit float->int conversion
authorJames Zern <jzern@google.com>
Fri, 22 Jul 2016 20:11:07 +0000 (13:11 -0700)
committerJames Zern <jzern@google.com>
Fri, 22 Jul 2016 20:11:07 +0000 (13:11 -0700)
Change-Id: I1efc16fa158740a06da719a1ea90c6dd6a182bb4

test/resize_test.cc

index 90f5452..f2899cf 100644 (file)
@@ -369,7 +369,7 @@ class ResizeInternalTest : public ResizeTest {
   }
 
   virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
-    if (!frame0_psnr_)
+    if (frame0_psnr_ == 0.)
       frame0_psnr_ = pkt->data.psnr.psnr[0];
     EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
   }
@@ -671,7 +671,7 @@ class ResizeCspTest : public ResizeTest {
   }
 
   virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
-    if (!frame0_psnr_)
+    if (frame0_psnr_ == 0.)
       frame0_psnr_ = pkt->data.psnr.psnr[0];
     EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0);
   }