From b5f6a2ce2fae423f40c4bdaf1be43ad5070b3868 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 26 Jun 2020 05:12:28 +0300 Subject: libcamera: Use Size::isNull() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the new Size::isNull() function through the code base to replace manual checks. While the new code isn't equivalent, as isNull() checks that both width and height are zero, it catches the same conditions in practice. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Niklas Söderlund --- test/v4l2_subdevice/test_formats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/v4l2_subdevice') diff --git a/test/v4l2_subdevice/test_formats.cpp b/test/v4l2_subdevice/test_formats.cpp index 9635c994..679f50b6 100644 --- a/test/v4l2_subdevice/test_formats.cpp +++ b/test/v4l2_subdevice/test_formats.cpp @@ -67,7 +67,7 @@ int FormatHandlingTest::run() return TestFail; } - if (format.size.width == 0 || format.size.height == 0) { + if (format.size.isNull()) { cerr << "Failed to update image format" << endl; return TestFail; } -- cgit v1.2.1