From d4649f5f68226bf2c92415b401194a67e5749d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20V=C3=B6llinger?= Date: Mon, 6 Jan 2014 12:00:02 +0100 Subject: Performance improvements Fixes some OSD Bugs Fixes bug in loading settings --- Pixel.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Pixel.h') diff --git a/Pixel.h b/Pixel.h index 55a684f..2acb9db 100644 --- a/Pixel.h +++ b/Pixel.h @@ -31,14 +31,9 @@ struct Pixel unsigned char r; unsigned char a; - int isBlack(int threshold = 3) { - - if (r > threshold || g > threshold || b > threshold) { - return false; - } - return true; + inline int isBlack(int threshold) { + return (r < threshold || g < threshold || b < threshold); } - }; #endif \ No newline at end of file -- cgit v1.2.3