From d05d162cb81664f292834fa5d48d623d2b6147a7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 16 Jul 2017 15:29:43 +0200 Subject: Misc code improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-find-rectangle.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/blind-find-rectangle.c') diff --git a/src/blind-find-rectangle.c b/src/blind-find-rectangle.c index a71e7e9..ac6e843 100644 --- a/src/blind-find-rectangle.c +++ b/src/blind-find-rectangle.c @@ -9,7 +9,6 @@ struct pair { }; static struct stream stream; -static double X, Y, Z, alpha = 1; static size_t min_width = 1; static size_t min_height = 1; static size_t min_area = 1; @@ -76,6 +75,7 @@ main(int argc, char *argv[]) { double colour_lf[4]; float colour_f[4]; + double X, Y, Z, alpha = 1; ARGBEGIN { case 'a': @@ -117,14 +117,12 @@ main(int argc, char *argv[]) colour_lf[2] = Z; colour_lf[3] = alpha; process(colour_lf); - } else if (stream.encoding == FLOAT) { + } else { colour_f[0] = (float)X; colour_f[1] = (float)Y; colour_f[2] = (float)Z; colour_f[3] = (float)alpha; process(colour_f); - } else { - eprintf("pixel format %s is not supported, try xyza\n", stream.pixfmt); } fshut(stdout, ""); -- cgit v1.2.3-70-g09d2