summaryrefslogtreecommitdiff
path: root/test/v4l2_subdevice/test_formats.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-06-26 05:12:28 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-08 20:55:13 +0300
commitb5f6a2ce2fae423f40c4bdaf1be43ad5070b3868 (patch)
tree6f6f6f2f47a17890a145a0afbb5f93a3f2edb4d3 /test/v4l2_subdevice/test_formats.cpp
parent61f4296ac749f39896f151221ea0e20876842803 (diff)
libcamera: Use Size::isNull()
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <email@uajain.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'test/v4l2_subdevice/test_formats.cpp')
-rw-r--r--test/v4l2_subdevice/test_formats.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}