From 33ce463a46c44f874fdbc3e484bee730e7b251a3 Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Tue, 25 Feb 2025 16:28:06 +0100 Subject: libcamera: formatting: Avoid spaces in for loops without expression The clang formatter removes spaces in places of empty expressions in for loops. For example, it changes for (init; condition; ) to for (init; condition;) libcamera currently uses both the styles and we should use only one of them for consistency. Since there is apparently no option to override the formatter behavior (see https://clang.llvm.org/docs/ClangFormatStyleOptions.html), let's remove the extra spaces to make the formatter happy. Signed-off-by: Milan Zamazal Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart --- src/apps/qcam/format_converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/apps/qcam') diff --git a/src/apps/qcam/format_converter.cpp b/src/apps/qcam/format_converter.cpp index 32123493..b025a3c7 100644 --- a/src/apps/qcam/format_converter.cpp +++ b/src/apps/qcam/format_converter.cpp @@ -249,7 +249,7 @@ void FormatConverter::convertYUVPacked(const Image *srcImage, unsigned char *dst dst_stride = width_ * 4; for (src_y = 0, dst_y = 0; dst_y < height_; src_y++, dst_y++) { - for (src_x = 0, dst_x = 0; dst_x < width_; ) { + for (src_x = 0, dst_x = 0; dst_x < width_;) { cb = src[src_y * src_stride + src_x * 4 + cb_pos_]; cr = src[src_y * src_stride + src_x * 4 + cr_pos]; -- cgit v1.2.1