From 053b6782ede50c99f88038d3af0f8977d702249f Mon Sep 17 00:00:00 2001 From: Evan Flynn Date: Wed, 1 May 2024 08:48:07 -0700 Subject: [PATCH] Fix linter error in uyvy file - Update comment in CI from Jammy to Noble Signed-off-by: Evan Flynn --- .github/workflows/build_test.yml | 2 +- include/usb_cam/formats/uyvy.hpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index ae44d338..8cb6df2c 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -40,7 +40,7 @@ jobs: sort -u) # Handle the case if two docker images were declared for one distro - # e.g. rolling moving from one Ubuntu Focal to Ubuntu Jammy + # e.g. rolling moving from one Ubuntu Jammy to Ubuntu Noble docker_image_arr=($docker_image) DISTRO_STR+="\"${distro}\", " diff --git a/include/usb_cam/formats/uyvy.hpp b/include/usb_cam/formats/uyvy.hpp index 61fcf23f..067f9f7d 100644 --- a/include/usb_cam/formats/uyvy.hpp +++ b/include/usb_cam/formats/uyvy.hpp @@ -80,13 +80,15 @@ class UYVY2RGB : public pixel_format_base /// /// Source: https://www.linuxtv.org/downloads/v4l-dvb-apis-old/V4L2-PIX-FMT-YUYV.html /// + // Use `INDENT-OFF` here to disable uncrustify for this function due to + // differing uncrustify formats for different distros + // *INDENT-OFF* void convert(const char * & src, char * & dest, const int & bytes_used) override { (void)bytes_used; // not used by this conversion method int i, j; unsigned char y0, y1, u, v; unsigned char r, g, b; - for (i = 0, j = 0; i < (static_cast(m_number_of_pixels) << 1); i += 4, j += 6) { u = (unsigned char)src[i + 0]; y0 = (unsigned char)src[i + 1]; @@ -102,6 +104,7 @@ class UYVY2RGB : public pixel_format_base dest[j + 5] = b; } } + // *INDENT-ON* private: size_t m_number_of_pixels;