lib/bitmap: fix warnings
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 8 May 2018 13:43:10 +0000 (09:43 -0400)
committerLucas Bajolet <lucas.bajolet@gmail.com>
Fri, 11 May 2018 03:14:40 +0000 (23:14 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/bitmap/bitmap.nit

index 2bfb252..3110265 100644 (file)
@@ -130,9 +130,6 @@ class Bitmap
                # =============== Bitmap header ================
                for x in [0..13] do
                        var b = fileReader.read_byte
-                       if b == null then
-                               return
-                       end
                        bitmap_header[x] = b.to_i
                end
                self.file_size = get_value(bitmap_header.subarray(2, 4))
@@ -141,7 +138,6 @@ class Bitmap
                # =============== DIB header ================
                for x in [0..39] do
                        var b = fileReader.read_byte
-                       if b == null then return
                        dib_header[x] = b.to_i
                end
                var dib_size = get_value(dib_header.subarray(0, 4))