From 55a444cf5a1126897ef2ddd415c0f99c8c43c2d8 Mon Sep 17 00:00:00 2001 From: andri lim Date: Wed, 16 May 2018 12:52:37 +0700 Subject: [PATCH] remove warning --- private/nimz.nim | 2 +- tester/testCodec.nim | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/private/nimz.nim b/private/nimz.nim index 5cf04b9..182e2bb 100644 --- a/private/nimz.nim +++ b/private/nimz.nim @@ -1179,7 +1179,7 @@ proc nzDeflate(nz: nzStream) = var blocksize = 0 var insize = nz.data.len - if nz.btype > 2: raise newNZError("invalid block type") + if nz.btype > 2: raise newNZError("invalid block type") elif nz.btype == 0: nz.deflateNoCompression return diff --git a/tester/testCodec.nim b/tester/testCodec.nim index d119e43..9088605 100644 --- a/tester/testCodec.nim +++ b/tester/testCodec.nim @@ -109,9 +109,9 @@ proc testOtherPattern1() = for y in 0..h-1: for x in 0..w-1: - image.data[4 * w * y + 4 * x + 0] = chr(int(127 * (1 + math.sin(float( x * x + y * y) / (float(w * h) / 8.0))))) - image.data[4 * w * y + 4 * x + 1] = chr(int(127 * (1 + math.sin(float((w - x - 1) * (w - x - 1) + y * y) / (float(w * h) / 8.0))))) - image.data[4 * w * y + 4 * x + 2] = chr(int(127 * (1 + math.sin(float( x * x + (h - y - 1) * (h - y - 1)) / (float(w * h) / 8.0))))) + image.data[4 * w * y + 4 * x + 0] = chr(int(127 * (1 + math.sin(float(x * x + y * y) / (float(w * h) / 8.0))))) + image.data[4 * w * y + 4 * x + 1] = chr(int(127 * (1 + math.sin(float((w - x - 1) * (w - x - 1) + y * y) / (float(w * h) / 8.0))))) + image.data[4 * w * y + 4 * x + 2] = chr(int(127 * (1 + math.sin(float(x * x + (h - y - 1) * (h - y - 1)) / (float(w * h) / 8.0))))) image.data[4 * w * y + 4 * x + 3] = chr(int(127 * (1 + math.sin(float((w - x - 1) * (w - x - 1) + (h - y - 1) * (h - y - 1)) / (float(w * h) / 8.0))))) doCodecTest(image)