From 2b1c100e8990b266ff8b4d6c257887c94e8a809a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 9 Aug 2024 00:42:46 +0200 Subject: Cleanup: better document parameter. --- src/lib/image.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/image.cc') diff --git a/src/lib/image.cc b/src/lib/image.cc index 2167918f8..7181c4546 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -1171,14 +1171,14 @@ Image::write_to_socket (shared_ptr socket) const float -Image::bytes_per_pixel (int c) const +Image::bytes_per_pixel(int component) const { auto d = av_pix_fmt_desc_get(_pixel_format); if (!d) { throw PixelFormatError ("bytes_per_pixel()", _pixel_format); } - if (c >= planes()) { + if (component >= planes()) { return 0; } @@ -1213,7 +1213,7 @@ Image::bytes_per_pixel (int c) const return bpp[0] + bpp[1] + bpp[2] + bpp[3]; } - return bpp[c]; + return bpp[component]; } -- cgit v1.2.3