From 011060aa032bb118b3345996d8307ccd4cb37258 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 26 Jan 2025 20:07:58 +0100 Subject: [PATCH] Cleanup: Various clang-tidy warnings in imbuf Pull Request: https://projects.blender.org/blender/blender/pulls/133734 --- source/blender/imbuf/IMB_colormanagement.hh | 5 +-- source/blender/imbuf/IMB_imbuf_enums.h | 4 +- source/blender/imbuf/IMB_imbuf_types.hh | 2 - source/blender/imbuf/IMB_moviecache.hh | 1 - .../intern/IMB_colormanagement_intern.hh | 3 +- source/blender/imbuf/intern/IMB_filetype.hh | 16 +++---- source/blender/imbuf/intern/IMB_filter.hh | 2 +- source/blender/imbuf/intern/allocimbuf.cc | 6 +-- .../blender/imbuf/intern/cineon/cineon_dpx.cc | 5 +-- .../blender/imbuf/intern/cineon/cineonlib.cc | 1 - .../blender/imbuf/intern/cineon/cineonlib.h | 24 +++++----- source/blender/imbuf/intern/cineon/dpxlib.h | 32 ++++++------- .../imbuf/intern/cineon/logImageCore.h | 42 +++++++---------- .../blender/imbuf/intern/cineon/logmemfile.h | 2 +- .../blender/imbuf/intern/colormanagement.cc | 14 +++--- source/blender/imbuf/intern/divers.cc | 2 - source/blender/imbuf/intern/filter.cc | 4 +- source/blender/imbuf/intern/format_dds.cc | 5 +-- source/blender/imbuf/intern/imageprocess.cc | 2 - source/blender/imbuf/intern/imbuf.hh | 5 +-- source/blender/imbuf/intern/interp.cc | 1 - source/blender/imbuf/intern/iris.cc | 11 ++--- source/blender/imbuf/intern/jp2.cc | 9 ++-- source/blender/imbuf/intern/jpeg.cc | 4 +- source/blender/imbuf/intern/module.cc | 2 - source/blender/imbuf/intern/moviecache.cc | 1 - .../imbuf/intern/oiio/openimageio_support.cc | 11 ++--- .../imbuf/intern/oiio/openimageio_support.hh | 4 +- .../imbuf/intern/openexr/openexr_api.cpp | 10 ++--- .../imbuf/intern/openexr/openexr_api.h | 2 +- .../imbuf/intern/openexr/openexr_stub.cpp | 2 - source/blender/imbuf/intern/readimage.cc | 1 - source/blender/imbuf/intern/rectop.cc | 45 ++++++------------- source/blender/imbuf/intern/rotate.cc | 1 - source/blender/imbuf/intern/scaling.cc | 6 +-- source/blender/imbuf/intern/stereoimbuf.cc | 5 --- source/blender/imbuf/intern/thumbs.cc | 1 - source/blender/imbuf/intern/thumbs_blend.cc | 4 -- source/blender/imbuf/intern/thumbs_font.cc | 1 - source/blender/imbuf/intern/util.cc | 1 - source/blender/imbuf/intern/util_gpu.cc | 8 ++-- source/blender/imbuf/intern/webp.cc | 5 +-- source/blender/imbuf/intern/writeimage.cc | 1 - .../imbuf/movie/intern/movie_proxy_indexer.cc | 2 +- .../blender/imbuf/movie/intern/movie_read.cc | 6 +-- .../blender/imbuf/movie/intern/movie_write.cc | 2 +- .../blender/imbuf/movie/intern/movie_write.hh | 2 +- 47 files changed, 117 insertions(+), 208 deletions(-) diff --git a/source/blender/imbuf/IMB_colormanagement.hh b/source/blender/imbuf/IMB_colormanagement.hh index 59169448b9a..a2d605bbf0a 100644 --- a/source/blender/imbuf/IMB_colormanagement.hh +++ b/source/blender/imbuf/IMB_colormanagement.hh @@ -9,7 +9,6 @@ */ #include "BLI_compiler_compat.h" -#include "BLI_sys_types.h" #include "BLI_math_matrix_types.hh" @@ -70,7 +69,7 @@ BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3]); /** * Byte equivalent of #IMB_colormanagement_get_luminance(). */ -BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char[3]); +BLI_INLINE unsigned char IMB_colormanagement_get_luminance_byte(const unsigned char rgb[3]); /** * Conversion between scene linear and other color spaces. @@ -549,4 +548,4 @@ void IMB_colormanagement_wavelength_to_rgb_table(float *r_table, int width); /** \} */ -#include "intern/colormanagement_inline.h" +#include "intern/colormanagement_inline.h" // IWYU pragma: export diff --git a/source/blender/imbuf/IMB_imbuf_enums.h b/source/blender/imbuf/IMB_imbuf_enums.h index 51d4c53b45c..51971643fac 100644 --- a/source/blender/imbuf/IMB_imbuf_enums.h +++ b/source/blender/imbuf/IMB_imbuf_enums.h @@ -47,14 +47,14 @@ enum eImbFileType { #endif }; -typedef enum IMB_Proxy_Size { +enum IMB_Proxy_Size { IMB_PROXY_NONE = 0, IMB_PROXY_25 = 1, IMB_PROXY_50 = 2, IMB_PROXY_75 = 4, IMB_PROXY_100 = 8, IMB_PROXY_MAX_SLOT = 4, -} IMB_Proxy_Size; +}; ENUM_OPERATORS(IMB_Proxy_Size, IMB_PROXY_100); #ifdef __cplusplus diff --git a/source/blender/imbuf/IMB_imbuf_types.hh b/source/blender/imbuf/IMB_imbuf_types.hh index cc07ce22859..45413909f55 100644 --- a/source/blender/imbuf/IMB_imbuf_types.hh +++ b/source/blender/imbuf/IMB_imbuf_types.hh @@ -6,8 +6,6 @@ #include "DNA_vec_types.h" /* for rcti */ -#include "BLI_sys_types.h" - #include "IMB_imbuf_enums.h" struct ColormanageCache; diff --git a/source/blender/imbuf/IMB_moviecache.hh b/source/blender/imbuf/IMB_moviecache.hh index 727c5c4352e..39d60d1c65f 100644 --- a/source/blender/imbuf/IMB_moviecache.hh +++ b/source/blender/imbuf/IMB_moviecache.hh @@ -9,7 +9,6 @@ */ #include "BLI_ghash.h" -#include "BLI_utildefines.h" /* Cache system for movie data - now supports storing ImBufs only * Supposed to provide unified cache system for movie clips, sequencer and diff --git a/source/blender/imbuf/intern/IMB_colormanagement_intern.hh b/source/blender/imbuf/intern/IMB_colormanagement_intern.hh index c700588ecbc..14f5e8ec284 100644 --- a/source/blender/imbuf/intern/IMB_colormanagement_intern.hh +++ b/source/blender/imbuf/intern/IMB_colormanagement_intern.hh @@ -8,12 +8,11 @@ #pragma once -#include "BLI_sys_types.h" #include "DNA_listBase.h" struct ImBuf; struct OCIO_ConstCPUProcessorRc; -typedef struct OCIO_ConstCPUProcessorRc *OCIO_ConstCPUProcessorRcPtr; +using OCIO_ConstCPUProcessorRcPtr = struct OCIO_ConstCPUProcessorRc *; extern float imbuf_luma_coefficients[3]; extern float imbuf_scene_linear_to_xyz[3][3]; diff --git a/source/blender/imbuf/intern/IMB_filetype.hh b/source/blender/imbuf/intern/IMB_filetype.hh index 235e4693a0d..8f5162461e7 100644 --- a/source/blender/imbuf/intern/IMB_filetype.hh +++ b/source/blender/imbuf/intern/IMB_filetype.hh @@ -149,7 +149,7 @@ ImBuf *imb_thumbnail_jpeg(const char *filepath, /** \name Format: BMP (#IMB_FTYPE_BMP) * \{ */ -bool imb_is_a_bmp(const unsigned char *buf, size_t size); +bool imb_is_a_bmp(const unsigned char *mem, size_t size); ImBuf *imb_load_bmp(const unsigned char *mem, size_t size, int flags, @@ -163,7 +163,7 @@ bool imb_save_bmp(ImBuf *ibuf, const char *filepath, int flags); /** \name Format: CINEON (#IMB_FTYPE_CINEON) * \{ */ -bool imb_is_a_cineon(const unsigned char *buf, size_t size); +bool imb_is_a_cineon(const unsigned char *mem, size_t size); bool imb_save_cineon(ImBuf *buf, const char *filepath, int flags); ImBuf *imb_load_cineon(const unsigned char *mem, size_t size, @@ -176,7 +176,7 @@ ImBuf *imb_load_cineon(const unsigned char *mem, /** \name Format: DPX (#IMB_FTYPE_DPX) * \{ */ -bool imb_is_a_dpx(const unsigned char *buf, size_t size); +bool imb_is_a_dpx(const unsigned char *mem, size_t size); bool imb_save_dpx(ImBuf *ibuf, const char *filepath, int flags); ImBuf *imb_load_dpx(const unsigned char *mem, size_t size, @@ -189,7 +189,7 @@ ImBuf *imb_load_dpx(const unsigned char *mem, /** \name Format: HDR (#IMB_FTYPE_RADHDR) * \{ */ -bool imb_is_a_hdr(const unsigned char *buf, size_t size); +bool imb_is_a_hdr(const unsigned char *mem, size_t size); ImBuf *imb_load_hdr(const unsigned char *mem, size_t size, int flags, @@ -202,7 +202,7 @@ bool imb_save_hdr(ImBuf *ibuf, const char *filepath, int flags); /** \name Format: TIFF (#IMB_FTYPE_TIF) * \{ */ -bool imb_is_a_tiff(const unsigned char *buf, size_t size); +bool imb_is_a_tiff(const unsigned char *mem, size_t size); /** * Loads a TIFF file. * \param mem: Memory containing the TIFF file. @@ -238,7 +238,7 @@ bool imb_save_tiff(ImBuf *ibuf, const char *filepath, int flags); /** \name Format: WEBP (#IMB_FTYPE_WEBP) * \{ */ -bool imb_is_a_webp(const unsigned char *buf, size_t size); +bool imb_is_a_webp(const unsigned char *mem, size_t size); ImBuf *imb_loadwebp(const unsigned char *mem, size_t size, int flags, @@ -259,7 +259,7 @@ bool imb_savewebp(ImBuf *ibuf, const char *filepath, int flags); void imb_init_dds(); -bool imb_is_a_dds(const unsigned char *buf, size_t size); +bool imb_is_a_dds(const unsigned char *mem, size_t size); ImBuf *imb_load_dds(const unsigned char *mem, size_t size, @@ -272,7 +272,7 @@ ImBuf *imb_load_dds(const unsigned char *mem, /** \name Format: PSD (#IMB_FTYPE_PSD) * \{ */ -bool imb_is_a_psd(const unsigned char *buf, size_t size); +bool imb_is_a_psd(const unsigned char *mem, size_t size); ImBuf *imb_load_psd(const unsigned char *mem, size_t size, diff --git a/source/blender/imbuf/intern/IMB_filter.hh b/source/blender/imbuf/intern/IMB_filter.hh index 66af19b03c7..0b2bf8d37c7 100644 --- a/source/blender/imbuf/intern/IMB_filter.hh +++ b/source/blender/imbuf/intern/IMB_filter.hh @@ -9,7 +9,7 @@ #pragma once -#include "BLI_sys_types.h" +#include struct ImBuf; diff --git a/source/blender/imbuf/intern/allocimbuf.cc b/source/blender/imbuf/intern/allocimbuf.cc index 749eb90d090..8d2d9008163 100644 --- a/source/blender/imbuf/intern/allocimbuf.cc +++ b/source/blender/imbuf/intern/allocimbuf.cc @@ -9,6 +9,7 @@ /* It's become a bit messy... Basically, only the IMB_ prefixed files * should remain. */ +#include #include #include "IMB_imbuf.hh" @@ -24,7 +25,6 @@ #include "MEM_guardedalloc.h" #include "BLI_threads.h" -#include "BLI_utildefines.h" #include "GPU_texture.hh" @@ -341,9 +341,7 @@ bool imb_enlargeencodedbufferImBuf(ImBuf *ibuf) } uint newsize = 2 * ibuf->encoded_buffer_size; - if (newsize < 10000) { - newsize = 10000; - } + newsize = std::max(newsize, 10000); ImBufByteBuffer new_buffer; if (!imb_alloc_buffer(new_buffer, newsize, 1, 1, sizeof(uint8_t), true)) { diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.cc b/source/blender/imbuf/intern/cineon/cineon_dpx.cc index 392ef2d2f44..44a7b52f054 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.cc +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.cc @@ -7,7 +7,6 @@ */ #include "logImageCore.h" -#include #include #include @@ -169,9 +168,9 @@ bool imb_save_cineon(ImBuf *buf, const char *filepath, int flags) return imb_save_dpx_cineon(buf, filepath, 1, flags); } -bool imb_is_a_cineon(const uchar *buf, size_t size) +bool imb_is_a_cineon(const uchar *mem, size_t size) { - return logImageIsCineon(buf, size); + return logImageIsCineon(mem, size); } ImBuf *imb_load_cineon(const uchar *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) diff --git a/source/blender/imbuf/intern/cineon/cineonlib.cc b/source/blender/imbuf/intern/cineon/cineonlib.cc index 4200b46ad85..b8a04d43268 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.cc +++ b/source/blender/imbuf/intern/cineon/cineonlib.cc @@ -20,7 +20,6 @@ #include "BLI_fileops.h" #include "BLI_string.h" -#include "BLI_utildefines.h" #include "MEM_guardedalloc.h" diff --git a/source/blender/imbuf/intern/cineon/cineonlib.h b/source/blender/imbuf/intern/cineon/cineonlib.h index bc3a749d199..2dd56fe761d 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.h +++ b/source/blender/imbuf/intern/cineon/cineonlib.h @@ -24,7 +24,7 @@ extern "C" { #define CINEON_UNDEFINED_R32 0x7F800000 #define CINEON_UNDEFINED_CHAR 0 -typedef struct { +struct CineonFileHeader { unsigned int magic_num; unsigned int offset; unsigned int gen_hdr_size; @@ -36,9 +36,9 @@ typedef struct { char creation_date[12]; char creation_time[12]; char reserved[36]; -} CineonFileHeader; +}; -typedef struct { +struct CineonElementHeader { uchar descriptor1; uchar descriptor2; uchar bits_per_sample; @@ -49,9 +49,9 @@ typedef struct { float ref_low_quantity; unsigned int ref_high_data; float ref_high_quantity; -} CineonElementHeader; +}; -typedef struct { +struct CineonImageHeader { uchar orientation; uchar elements_per_image; unsigned short filler; @@ -73,9 +73,9 @@ typedef struct { unsigned int line_padding; unsigned int element_padding; char reserved2[20]; -} CineonImageHeader; +}; -typedef struct { +struct CineonOriginationHeader { int x_offset; int y_offset; char file_name[100]; @@ -88,9 +88,9 @@ typedef struct { float y_input_samples_per_mm; float input_device_gamma; char reserved[40]; -} CineonOriginationHeader; +}; -typedef struct { +struct CineonFilmHeader { uchar film_code; uchar film_type; uchar edge_code_perforation_offset; @@ -103,14 +103,14 @@ typedef struct { char attribute[32]; char slate[200]; char reserved[740]; -} CineonFilmHeader; +}; -typedef struct { +struct CineonMainHeader { CineonFileHeader fileHeader; CineonImageHeader imageHeader; CineonOriginationHeader originationHeader; CineonFilmHeader filmHeader; -} CineonMainHeader; +}; void cineonSetVerbose(int); LogImageFile *cineonOpen(const uchar *byteStuff, int fromMemory, size_t bufferSize); diff --git a/source/blender/imbuf/intern/cineon/dpxlib.h b/source/blender/imbuf/intern/cineon/dpxlib.h index ee0caafacb2..a54979f24b7 100644 --- a/source/blender/imbuf/intern/cineon/dpxlib.h +++ b/source/blender/imbuf/intern/cineon/dpxlib.h @@ -10,7 +10,7 @@ #pragma once -#include +#include #include "logImageCore.h" @@ -23,10 +23,10 @@ extern "C" { #define DPX_UNDEFINED_U16 0xFFFF #define DPX_UNDEFINED_U32 0xFFFFFFFF #define DPX_UNDEFINED_R32 NAN -#define IS_DPX_UNDEFINED_R32(x) isnan(x) +#define IS_DPX_UNDEFINED_R32(x) std::isnan(x) #define DPX_UNDEFINED_CHAR 0 -typedef struct { +struct DpxFileHeader { unsigned int magic_num; unsigned int offset; char version[8]; @@ -42,9 +42,9 @@ typedef struct { char copyright[200]; unsigned int key; char reserved[104]; -} DpxFileHeader; +}; -typedef struct { +struct DpxElementHeader { unsigned int data_sign; unsigned int ref_low_data; float ref_low_quantity; @@ -60,18 +60,18 @@ typedef struct { unsigned int line_padding; unsigned int element_padding; char description[32]; -} DpxElementHeader; +}; -typedef struct { +struct DpxImageHeader { unsigned short orientation; unsigned short elements_per_image; unsigned int pixels_per_line; unsigned int lines_per_element; DpxElementHeader element[8]; char reserved[52]; -} DpxImageHeader; +}; -typedef struct { +struct DpxOrientationHeader { unsigned int x_offset; unsigned int y_offset; float x_center; @@ -85,9 +85,9 @@ typedef struct { unsigned short border_validity[4]; unsigned int pixel_aspect_ratio[2]; char reserved[28]; -} DpxOrientationHeader; +}; -typedef struct { +struct DpxFilmHeader { char film_manufacturer_id[2]; char film_type[2]; char edge_code_perforation_offset[2]; @@ -102,9 +102,9 @@ typedef struct { char frame_identification[32]; char slate_info[100]; char reserved[56]; -} DpxFilmHeader; +}; -typedef struct { +struct DpxTelevisionHeader { unsigned int time_code; unsigned int user_bits; unsigned char interlace; @@ -122,15 +122,15 @@ typedef struct { float white_level; float integration_times; unsigned char reserved[76]; -} DpxTelevisionHeader; +}; -typedef struct { +struct DpxMainHeader { DpxFileHeader fileHeader; DpxImageHeader imageHeader; DpxOrientationHeader orientationHeader; DpxFilmHeader filmHeader; DpxTelevisionHeader televisionHeader; -} DpxMainHeader; +}; void dpxSetVerbose(int verbosity); LogImageFile *dpxOpen(const unsigned char *byteStuff, int fromMemory, size_t bufferSize); diff --git a/source/blender/imbuf/intern/cineon/logImageCore.h b/source/blender/imbuf/intern/cineon/logImageCore.h index 501d23ef39e..3daec6a77cb 100644 --- a/source/blender/imbuf/intern/cineon/logImageCore.h +++ b/source/blender/imbuf/intern/cineon/logImageCore.h @@ -15,10 +15,10 @@ #pragma once -#include +#include +#include "BLI_compiler_compat.h" #include "BLI_sys_types.h" -#include "BLI_utildefines.h" #ifdef _WIN32 # define PATHSEP_CHAR '\\' @@ -41,7 +41,7 @@ enum format { format_Cineon, }; -typedef struct LogImageElement { +struct LogImageElement { int depth; int bitsPerSample; int dataOffset; @@ -53,9 +53,9 @@ typedef struct LogImageElement { float refLowQuantity; float refHighQuantity; float maxValue; /* = 2^bitsPerSample - 1 (used internally, doesn't come from the file header) */ -} LogImageElement; +}; -typedef struct LogImageFile { +struct LogImageFile { /* specified in header */ int width; int height; @@ -79,7 +79,7 @@ typedef struct LogImageFile { /* DPX or Cineon ? */ int srcFormat; -} LogImageFile; +}; /* The SMPTE defines this code: * 0 - User-defined @@ -207,9 +207,7 @@ BLI_INLINE unsigned short swap_ushort(unsigned short x, int swap) if (swap != 0) { return (x >> 8) | (x << 8); } - else { - return x; - } + return x; } BLI_INLINE unsigned int swap_uint(unsigned int x, int swap) @@ -217,9 +215,7 @@ BLI_INLINE unsigned int swap_uint(unsigned int x, int swap) if (swap != 0) { return (x >> 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) | (x << 24); } - else { - return x; - } + return x; } BLI_INLINE float swap_float(float x, int swap) @@ -237,9 +233,7 @@ BLI_INLINE float swap_float(float x, int swap) dat2.b[3] = dat1.b[0]; return dat2.f; } - else { - return x; - } + return x; } /* Other */ @@ -249,12 +243,10 @@ BLI_INLINE unsigned int clamp_uint(unsigned int x, unsigned int low, unsigned in if (x > high) { return high; } - else if (x < low) { + if (x < low) { return low; } - else { - return x; - } + return x; } BLI_INLINE float clamp_float(float x, float low, float high) @@ -262,12 +254,10 @@ BLI_INLINE float clamp_float(float x, float low, float high) if (x > high) { return high; } - else if (x < low) { + if (x < low) { return low; } - else { - return x; - } + return x; } BLI_INLINE unsigned int float_uint(float value, unsigned int max) @@ -275,12 +265,10 @@ BLI_INLINE unsigned int float_uint(float value, unsigned int max) if (value < 0.0f) { return 0; } - else if (value > (1.0f - 0.5f / (float)max)) { + if (value > (1.0f - 0.5f / (float)max)) { return max; } - else { - return (unsigned int)(((float)max * value) + 0.5f); - } + return (unsigned int)(((float)max * value) + 0.5f); } #ifdef __cplusplus diff --git a/source/blender/imbuf/intern/cineon/logmemfile.h b/source/blender/imbuf/intern/cineon/logmemfile.h index 584ef8a67dd..8012c669346 100644 --- a/source/blender/imbuf/intern/cineon/logmemfile.h +++ b/source/blender/imbuf/intern/cineon/logmemfile.h @@ -12,7 +12,7 @@ #include "logImageCore.h" -#include +#include int logimage_fseek(LogImageFile *logFile, intptr_t offset, int origin); int logimage_fwrite(const void *buffer, size_t size, unsigned int count, LogImageFile *logFile); diff --git a/source/blender/imbuf/intern/colormanagement.cc b/source/blender/imbuf/intern/colormanagement.cc index 82e0381b8a5..c55393099b3 100644 --- a/source/blender/imbuf/intern/colormanagement.cc +++ b/source/blender/imbuf/intern/colormanagement.cc @@ -28,9 +28,9 @@ #include "MEM_guardedalloc.h" -#include "BLI_blenlib.h" #include "BLI_math_color.h" #include "BLI_math_color.hh" +#include "BLI_path_utils.hh" #include "BLI_rect.h" #include "BLI_string.h" #include "BLI_task.h" @@ -947,8 +947,7 @@ static OCIO_ConstCPUProcessorRcPtr *colorspace_to_scene_linear_cpu_processor( colorspace->name, global_role_scene_linear); if (processor != nullptr) { - colorspace->to_scene_linear = (OCIO_ConstCPUProcessorRcPtr *)OCIO_processorGetCPUProcessor( - processor); + colorspace->to_scene_linear = OCIO_processorGetCPUProcessor(processor); OCIO_processorRelease(processor); } } @@ -970,8 +969,7 @@ static OCIO_ConstCPUProcessorRcPtr *colorspace_from_scene_linear_cpu_processor( global_role_scene_linear, colorspace->name); if (processor != nullptr) { - colorspace->from_scene_linear = (OCIO_ConstCPUProcessorRcPtr *) - OCIO_processorGetCPUProcessor(processor); + colorspace->from_scene_linear = OCIO_processorGetCPUProcessor(processor); OCIO_processorRelease(processor); } } @@ -1010,8 +1008,7 @@ static OCIO_ConstCPUProcessorRcPtr *display_from_scene_linear_processor( } if (processor != nullptr) { - display->from_scene_linear = (OCIO_ConstCPUProcessorRcPtr *)OCIO_processorGetCPUProcessor( - processor); + display->from_scene_linear = OCIO_processorGetCPUProcessor(processor); OCIO_processorRelease(processor); } } @@ -1049,8 +1046,7 @@ static OCIO_ConstCPUProcessorRcPtr *display_to_scene_linear_processor(ColorManag } if (processor != nullptr) { - display->to_scene_linear = (OCIO_ConstCPUProcessorRcPtr *)OCIO_processorGetCPUProcessor( - processor); + display->to_scene_linear = OCIO_processorGetCPUProcessor(processor); OCIO_processorRelease(processor); } } diff --git a/source/blender/imbuf/intern/divers.cc b/source/blender/imbuf/intern/divers.cc index 704fee2fae4..59bfdcf66f4 100644 --- a/source/blender/imbuf/intern/divers.cc +++ b/source/blender/imbuf/intern/divers.cc @@ -9,12 +9,10 @@ #include "BLI_rect.h" #include "BLI_task.hh" -#include "BLI_utildefines.h" #include "IMB_filter.hh" #include "IMB_imbuf.hh" #include "IMB_imbuf_types.hh" -#include "imbuf.hh" #include "IMB_colormanagement.hh" #include "IMB_colormanagement_intern.hh" diff --git a/source/blender/imbuf/intern/filter.cc b/source/blender/imbuf/intern/filter.cc index cdbbcfabb6b..0e505ffa2f7 100644 --- a/source/blender/imbuf/intern/filter.cc +++ b/source/blender/imbuf/intern/filter.cc @@ -17,8 +17,6 @@ #include "IMB_imbuf.hh" #include "IMB_imbuf_types.hh" -#include "imbuf.hh" - static void filtcolum(uchar *point, int y, int skip) { uint c1, c2, c3, error; @@ -168,7 +166,7 @@ static void imb_filterN(ImBuf *out, ImBuf *in) const float *row1 = (y == 0) ? row2 : row2 - channels * rowlen; const float *row3 = (y == in->y - 1) ? row2 : row2 + channels * rowlen; - float *cp = (float *)out->float_buffer.data + y * channels * rowlen; + float *cp = out->float_buffer.data + y * channels * rowlen; for (int x = 0; x < rowlen; x++) { const float *r11, *r13, *r21, *r23, *r31, *r33; diff --git a/source/blender/imbuf/intern/format_dds.cc b/source/blender/imbuf/intern/format_dds.cc index 9c1775fa6ac..0e0cc4bfd18 100644 --- a/source/blender/imbuf/intern/format_dds.cc +++ b/source/blender/imbuf/intern/format_dds.cc @@ -11,7 +11,6 @@ */ #include -#include #include "oiio/openimageio_support.hh" @@ -44,9 +43,9 @@ void imb_init_dds() } } -bool imb_is_a_dds(const uchar *buf, size_t size) +bool imb_is_a_dds(const uchar *mem, size_t size) { - return imb_oiio_check(buf, size, "dds"); + return imb_oiio_check(mem, size, "dds"); } ImBuf *imb_load_dds(const uchar *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) diff --git a/source/blender/imbuf/intern/imageprocess.cc b/source/blender/imbuf/intern/imageprocess.cc index 5c0e19dcfb5..838a6e3e6cf 100644 --- a/source/blender/imbuf/intern/imageprocess.cc +++ b/source/blender/imbuf/intern/imageprocess.cc @@ -7,13 +7,11 @@ * \ingroup imbuf */ -#include #include #include "MEM_guardedalloc.h" #include "BLI_task.h" -#include "BLI_utildefines.h" #include "IMB_colormanagement.hh" #include "IMB_imbuf.hh" diff --git a/source/blender/imbuf/intern/imbuf.hh b/source/blender/imbuf/intern/imbuf.hh index 73987f59e91..b2c1b48c946 100644 --- a/source/blender/imbuf/intern/imbuf.hh +++ b/source/blender/imbuf/intern/imbuf.hh @@ -8,8 +8,7 @@ #pragma once -#include -#include +#include #include #ifndef WIN32 @@ -17,8 +16,6 @@ #endif #include -#include -#include #include #ifndef WIN32 diff --git a/source/blender/imbuf/intern/interp.cc b/source/blender/imbuf/intern/interp.cc index e4fb1432e35..aee44a5b57a 100644 --- a/source/blender/imbuf/intern/interp.cc +++ b/source/blender/imbuf/intern/interp.cc @@ -6,7 +6,6 @@ * \ingroup imbuf */ -#include "BLI_math_vector.h" #include "IMB_colormanagement.hh" #include "IMB_interp.hh" diff --git a/source/blender/imbuf/intern/iris.cc b/source/blender/imbuf/intern/iris.cc index 41e6fff9855..0b547a5b20e 100644 --- a/source/blender/imbuf/intern/iris.cc +++ b/source/blender/imbuf/intern/iris.cc @@ -6,6 +6,7 @@ * \ingroup imbuf */ +#include #include #include "BLI_fileops.h" @@ -309,9 +310,7 @@ ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colorspace[IM if (!ibuf) { goto fail_rle; } - if (ibuf->planes > 32) { - ibuf->planes = 32; - } + ibuf->planes = std::min(ibuf->planes, 32); base = (uint *)ibuf->byte_buffer.data; if (badorder) { @@ -419,9 +418,7 @@ ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colorspace[IM if (!ibuf) { goto fail_uncompressed; } - if (ibuf->planes > 32) { - ibuf->planes = 32; - } + ibuf->planes = std::min(ibuf->planes, 32); base = (uint *)ibuf->byte_buffer.data; @@ -925,7 +922,7 @@ static int compressrow(const uchar *lbuf, uchar *rlebuf, const int z, const int } } *optr++ = 0; - return optr - (uchar *)rlebuf; + return optr - rlebuf; } bool imb_saveiris(ImBuf *ibuf, const char *filepath, int /*flags*/) diff --git a/source/blender/imbuf/intern/jp2.cc b/source/blender/imbuf/intern/jp2.cc index 081b888fa51..e6af05a5b82 100644 --- a/source/blender/imbuf/intern/jp2.cc +++ b/source/blender/imbuf/intern/jp2.cc @@ -17,6 +17,7 @@ #include "openjpeg.h" +#include #include #define JP2_FILEHEADER_SIZE 12 @@ -417,9 +418,7 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, } i = image->numcomps; - if (i > 4) { - i = 4; - } + i = std::min(i, 4); while (i) { i--; @@ -694,9 +693,7 @@ static void cinema_setup_encoder(opj_cparameters_t *parameters, switch (parameters->cp_cinema) { case OPJ_CINEMA2K_24: case OPJ_CINEMA2K_48: - if (parameters->numresolution > 6) { - parameters->numresolution = 6; - } + parameters->numresolution = std::min(parameters->numresolution, 6); if (!((image->comps[0].w == 2048) || (image->comps[0].h == 1080))) { fprintf(stdout, "Image coordinates %u x %u is not 2K compliant.\nJPEG Digital Cinema Profile-3 " diff --git a/source/blender/imbuf/intern/jpeg.cc b/source/blender/imbuf/intern/jpeg.cc index 4a2a3780917..5f931ba0755 100644 --- a/source/blender/imbuf/intern/jpeg.cc +++ b/source/blender/imbuf/intern/jpeg.cc @@ -662,9 +662,7 @@ static int init_jpeg(FILE *outfile, jpeg_compress_struct *cinfo, ImBuf *ibuf) if (quality <= 0) { quality = jpeg_default_quality; } - if (quality > 100) { - quality = 100; - } + quality = std::min(quality, 100); jpeg_create_compress(cinfo); jpeg_stdio_dest(cinfo, outfile); diff --git a/source/blender/imbuf/intern/module.cc b/source/blender/imbuf/intern/module.cc index 3c0b22536f0..c3e9b333224 100644 --- a/source/blender/imbuf/intern/module.cc +++ b/source/blender/imbuf/intern/module.cc @@ -8,8 +8,6 @@ #include -#include "BLI_utildefines.h" - #include "IMB_allocimbuf.hh" #include "IMB_colormanagement_intern.hh" #include "IMB_filetype.hh" diff --git a/source/blender/imbuf/intern/moviecache.cc b/source/blender/imbuf/intern/moviecache.cc index 6cd5c6bb95b..4f6dbf12c28 100644 --- a/source/blender/imbuf/intern/moviecache.cc +++ b/source/blender/imbuf/intern/moviecache.cc @@ -18,7 +18,6 @@ #include "BLI_ghash.h" #include "BLI_mempool.h" #include "BLI_string.h" -#include "BLI_utildefines.h" #include "IMB_moviecache.hh" diff --git a/source/blender/imbuf/intern/oiio/openimageio_support.cc b/source/blender/imbuf/intern/oiio/openimageio_support.cc index c4a605053ec..afc772dd4d4 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_support.cc +++ b/source/blender/imbuf/intern/oiio/openimageio_support.cc @@ -6,11 +6,14 @@ #include #include -#include "BLI_blenlib.h" +#include + +#include "BLI_listbase.h" +#include "BLI_string.h" #include "BKE_idprop.hh" -#include "DNA_ID.h" /* ID property definitions. */ +#include "DNA_ID.h" #include "IMB_allocimbuf.hh" #include "IMB_colormanagement.hh" #include "IMB_metadata.hh" @@ -52,9 +55,7 @@ class ImBufMemWriter : public Filesystem::IOProxy { memcpy(ibuf_->encoded_buffer.data + offset, buf, size); - if (end > ibuf_->encoded_size) { - ibuf_->encoded_size = end; - } + ibuf_->encoded_size = std::max(end, ibuf_->encoded_size); return size; } diff --git a/source/blender/imbuf/intern/oiio/openimageio_support.hh b/source/blender/imbuf/intern/oiio/openimageio_support.hh index 7e1416abdba..8933825a32b 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_support.hh +++ b/source/blender/imbuf/intern/oiio/openimageio_support.hh @@ -4,11 +4,9 @@ #pragma once -#include - /* Include our own math header first to avoid warnings about M_PI * redefinition between OpenImageIO and Windows headers. */ -#include "BLI_math_base.h" +#include "BLI_math_base.h" // IWYU pragma: keep #include "BLI_sys_types.h" #include diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 3a209bd5003..9d7fb1de6fe 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include /* The OpenEXR version can reliably be found in this header file from OpenEXR, @@ -75,11 +74,12 @@ #include "MEM_guardedalloc.h" -#include "BLI_blenlib.h" #include "BLI_fileops.h" #include "BLI_math_base.hh" #include "BLI_math_color.h" #include "BLI_mmap.h" +#include "BLI_path_utils.hh" +#include "BLI_string.h" #include "BLI_threads.h" #include "BKE_idprop.hh" @@ -760,7 +760,7 @@ void *IMB_exr_get_handle_name(const char *name) void IMB_exr_add_view(void *handle, const char *name) { ExrHandle *data = (ExrHandle *)handle; - data->multiView->push_back(name); + data->multiView->emplace_back(name); } static int imb_exr_get_multiView_id(StringVector &views, const std::string &name) @@ -1660,11 +1660,11 @@ static std::vector exr_channels_in_multi_part_file( for (int p = 0; p < file.parts(); p++) { const ChannelList &c = file.header(p).channels(); - std::string part_view = ""; + std::string part_view; if (file.header(p).hasView()) { part_view = file.header(p).view(); } - std::string part_name = ""; + std::string part_name; if (file.header(p).hasName()) { part_name = file.header(p).name(); } diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index 27d5b18bf4c..630c28bf179 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #ifdef __cplusplus extern "C" { diff --git a/source/blender/imbuf/intern/openexr/openexr_stub.cpp b/source/blender/imbuf/intern/openexr/openexr_stub.cpp index 1d79ef21003..028ceb482fb 100644 --- a/source/blender/imbuf/intern/openexr/openexr_stub.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_stub.cpp @@ -6,8 +6,6 @@ * \ingroup openexr */ -#include "openexr_api.h" - #include "IMB_openexr.hh" void *IMB_exr_get_handle() diff --git a/source/blender/imbuf/intern/readimage.cc b/source/blender/imbuf/intern/readimage.cc index 692a9293f11..d7bb369066b 100644 --- a/source/blender/imbuf/intern/readimage.cc +++ b/source/blender/imbuf/intern/readimage.cc @@ -16,7 +16,6 @@ #include "BLI_mmap.h" #include "BLI_path_utils.hh" /* For assertions. */ #include "BLI_string.h" -#include "BLI_utildefines.h" #include #include "IMB_allocimbuf.hh" diff --git a/source/blender/imbuf/intern/rectop.cc b/source/blender/imbuf/intern/rectop.cc index 15c0e901b00..083c67e09f4 100644 --- a/source/blender/imbuf/intern/rectop.cc +++ b/source/blender/imbuf/intern/rectop.cc @@ -6,6 +6,7 @@ * \ingroup imbuf */ +#include #include #include "BLI_math_base.h" @@ -340,23 +341,15 @@ void IMB_rectclip(ImBuf *dbuf, } tmp = dbuf->x - *destx; - if (*width > tmp) { - *width = tmp; - } + *width = std::min(*width, tmp); tmp = dbuf->y - *desty; - if (*height > tmp) { - *height = tmp; - } + *height = std::min(*height, tmp); if (sbuf) { tmp = sbuf->x - *srcx; - if (*width > tmp) { - *width = tmp; - } + *width = std::min(*width, tmp); tmp = sbuf->y - *srcy; - if (*height > tmp) { - *height = tmp; - } + *height = std::min(*height, tmp); } if ((*height <= 0) || (*width <= 0)) { @@ -422,34 +415,22 @@ static void imb_rectclip3(ImBuf *dbuf, } tmp = dbuf->x - *destx; - if (*width > tmp) { - *width = tmp; - } + *width = std::min(*width, tmp); tmp = dbuf->y - *desty; - if (*height > tmp) { - *height = tmp; - } + *height = std::min(*height, tmp); if (obuf) { tmp = obuf->x - *origx; - if (*width > tmp) { - *width = tmp; - } + *width = std::min(*width, tmp); tmp = obuf->y - *origy; - if (*height > tmp) { - *height = tmp; - } + *height = std::min(*height, tmp); } if (sbuf) { tmp = sbuf->x - *srcx; - if (*width > tmp) { - *width = tmp; - } + *width = std::min(*width, tmp); tmp = sbuf->y - *srcy; - if (*height > tmp) { - *height = tmp; - } + *height = std::min(*height, tmp); } if ((*height <= 0) || (*width <= 0)) { @@ -813,7 +794,7 @@ void IMB_rectblend(ImBuf *dbuf, else { for (x = width; x > 0; x--, dr++, outr++, sr++, cmr++) { uchar *src = (uchar *)sr; - float mask = float(mask_max) * float(*cmr); + float mask = mask_max * float(*cmr); if (texmaskrect) { mask *= (float(*tmr++) / 65535.0f); @@ -911,7 +892,7 @@ void IMB_rectblend(ImBuf *dbuf, /* No destination mask buffer, do regular blend with mask-texture if present. */ else { for (x = width; x > 0; x--, drf += 4, orf += 4, srf += 4, cmr++) { - float mask = float(mask_max) * float(*cmr); + float mask = mask_max * float(*cmr); if (texmaskrect) { mask *= (float(*tmr++) / 65535.0f); diff --git a/source/blender/imbuf/intern/rotate.cc b/source/blender/imbuf/intern/rotate.cc index 10b515764f4..0fc7556c108 100644 --- a/source/blender/imbuf/intern/rotate.cc +++ b/source/blender/imbuf/intern/rotate.cc @@ -12,7 +12,6 @@ #include "IMB_imbuf.hh" #include "IMB_imbuf_types.hh" -#include "imbuf.hh" bool IMB_rotate_orthogonal(ImBuf *ibuf, int degrees) { diff --git a/source/blender/imbuf/intern/scaling.cc b/source/blender/imbuf/intern/scaling.cc index 35c241c4e3d..d5578369dba 100644 --- a/source/blender/imbuf/intern/scaling.cc +++ b/source/blender/imbuf/intern/scaling.cc @@ -7,8 +7,6 @@ * \ingroup imbuf */ -#include - #include "BLI_math_vector.hh" #include "BLI_task.hh" #include "BLI_utildefines.h" @@ -127,8 +125,8 @@ static void imb_half_y_no_alloc(ImBuf *ibuf2, ImBuf *ibuf1) _p1 = ibuf1->byte_buffer.data; dest = ibuf2->byte_buffer.data; - _p1f = (float *)ibuf1->float_buffer.data; - destf = (float *)ibuf2->float_buffer.data; + _p1f = ibuf1->float_buffer.data; + destf = ibuf2->float_buffer.data; for (y = ibuf2->y; y > 0; y--) { if (do_rect) { diff --git a/source/blender/imbuf/intern/stereoimbuf.cc b/source/blender/imbuf/intern/stereoimbuf.cc index 51b87788f17..d81dae2e0a9 100644 --- a/source/blender/imbuf/intern/stereoimbuf.cc +++ b/source/blender/imbuf/intern/stereoimbuf.cc @@ -12,15 +12,10 @@ #include "IMB_imbuf.hh" #include "IMB_imbuf_types.hh" -#include "imbuf.hh" - -#include "MEM_guardedalloc.h" - #include "BLI_math_vector.h" #include "BLI_utildefines.h" #include "DNA_scene_types.h" -#include "DNA_userdef_types.h" /* prototypes */ struct Stereo3DData; diff --git a/source/blender/imbuf/intern/thumbs.cc b/source/blender/imbuf/intern/thumbs.cc index 334667fd760..f7ca7b11941 100644 --- a/source/blender/imbuf/intern/thumbs.cc +++ b/source/blender/imbuf/intern/thumbs.cc @@ -7,7 +7,6 @@ */ #include -#include #include #include "MEM_guardedalloc.h" diff --git a/source/blender/imbuf/intern/thumbs_blend.cc b/source/blender/imbuf/intern/thumbs_blend.cc index 7048a1850c3..3d606614e8b 100644 --- a/source/blender/imbuf/intern/thumbs_blend.cc +++ b/source/blender/imbuf/intern/thumbs_blend.cc @@ -6,13 +6,9 @@ * \ingroup imbuf */ -#include #include #include -#include "BLI_listbase.h" /* Needed due to import of BLO_readfile.hh */ -#include "BLI_utildefines.h" - #include "BLO_readfile.hh" #include "BKE_idtype.hh" diff --git a/source/blender/imbuf/intern/thumbs_font.cc b/source/blender/imbuf/intern/thumbs_font.cc index 2ef5ce2f71c..62ed8f963ef 100644 --- a/source/blender/imbuf/intern/thumbs_font.cc +++ b/source/blender/imbuf/intern/thumbs_font.cc @@ -7,7 +7,6 @@ */ #include "BLI_hash_md5.hh" -#include "BLI_utildefines.h" #include "IMB_imbuf.hh" #include "IMB_imbuf_types.hh" diff --git a/source/blender/imbuf/intern/util.cc b/source/blender/imbuf/intern/util.cc index f1c4b94d90f..1ace379dbe1 100644 --- a/source/blender/imbuf/intern/util.cc +++ b/source/blender/imbuf/intern/util.cc @@ -14,7 +14,6 @@ #include "BLI_fileops.h" #include "BLI_path_utils.hh" -#include "BLI_utildefines.h" #ifdef _WIN32 # include "BLI_winstuff.h" #endif diff --git a/source/blender/imbuf/intern/util_gpu.cc b/source/blender/imbuf/intern/util_gpu.cc index d4d8b11febb..ff7f983eca9 100644 --- a/source/blender/imbuf/intern/util_gpu.cc +++ b/source/blender/imbuf/intern/util_gpu.cc @@ -33,11 +33,9 @@ static bool imb_is_grayscale_texture_format_compatible(const ImBuf *ibuf) * and can therefore be optimized. */ return true; } - else { - /* TODO: Support gray-scale byte buffers. - * The challenge is that Blender always stores byte images as RGBA. */ - return false; - } + /* TODO: Support gray-scale byte buffers. + * The challenge is that Blender always stores byte images as RGBA. */ + return false; } /* Only #IMBuf's with color-space that do not modify the chrominance of the texture data relative diff --git a/source/blender/imbuf/intern/webp.cc b/source/blender/imbuf/intern/webp.cc index b2f7d1400c3..37fe833ea40 100644 --- a/source/blender/imbuf/intern/webp.cc +++ b/source/blender/imbuf/intern/webp.cc @@ -20,7 +20,6 @@ #include "BLI_fileops.h" #include "BLI_mmap.h" -#include "BLI_utildefines.h" #include "IMB_allocimbuf.hh" #include "IMB_colormanagement.hh" @@ -30,9 +29,9 @@ #include "MEM_guardedalloc.h" -bool imb_is_a_webp(const uchar *buf, size_t size) +bool imb_is_a_webp(const uchar *mem, size_t size) { - if (WebPGetInfo(buf, size, nullptr, nullptr)) { + if (WebPGetInfo(mem, size, nullptr, nullptr)) { return true; } return false; diff --git a/source/blender/imbuf/intern/writeimage.cc b/source/blender/imbuf/intern/writeimage.cc index 9eb96b69259..820f6b625dd 100644 --- a/source/blender/imbuf/intern/writeimage.cc +++ b/source/blender/imbuf/intern/writeimage.cc @@ -11,7 +11,6 @@ #include #include "BLI_path_utils.hh" /* For assertions. */ -#include "BLI_utildefines.h" #include "IMB_colormanagement.hh" #include "IMB_filetype.hh" diff --git a/source/blender/imbuf/movie/intern/movie_proxy_indexer.cc b/source/blender/imbuf/movie/intern/movie_proxy_indexer.cc index 90dc32637eb..42f7ea0b7e2 100644 --- a/source/blender/imbuf/movie/intern/movie_proxy_indexer.cc +++ b/source/blender/imbuf/movie/intern/movie_proxy_indexer.cc @@ -820,7 +820,7 @@ static MovieProxyBuilder *index_ffmpeg_create_context(MovieReader *anim, } } - return (MovieProxyBuilder *)context; + return context; } static void index_rebuild_ffmpeg_finish(MovieProxyBuilder *context, const bool stop) diff --git a/source/blender/imbuf/movie/intern/movie_read.cc b/source/blender/imbuf/movie/intern/movie_read.cc index 963c6e7866a..40022e7de2b 100644 --- a/source/blender/imbuf/movie/intern/movie_read.cc +++ b/source/blender/imbuf/movie/intern/movie_read.cc @@ -7,6 +7,7 @@ * \ingroup imbuf */ +#include #include #include #include @@ -14,7 +15,6 @@ #include #include -#include "BLI_math_base.hh" #include "BLI_path_utils.hh" #include "BLI_string.h" #include "BLI_threads.h" @@ -871,9 +871,7 @@ static int64_t ffmpeg_get_seek_pts(MovieReader *anim, int64_t pts_to_search) */ int64_t seek_pts = pts_to_search - (ffmpeg_steps_per_frame_get(anim) * 3); - if (seek_pts < 0) { - seek_pts = 0; - } + seek_pts = std::max(seek_pts, 0); return seek_pts; } diff --git a/source/blender/imbuf/movie/intern/movie_write.cc b/source/blender/imbuf/movie/intern/movie_write.cc index 1ebc1eac718..0f9a9730cc2 100644 --- a/source/blender/imbuf/movie/intern/movie_write.cc +++ b/source/blender/imbuf/movie/intern/movie_write.cc @@ -280,7 +280,7 @@ static AVFrame *generate_video_frame(MovieWriter *context, const ImBuf *image) /* Convert to the output pixel format, if it's different that Blender's internal one. */ if (context->img_convert_frame != nullptr) { - BLI_assert(context->img_convert_ctx != NULL); + BLI_assert(context->img_convert_ctx != nullptr); /* Ensure the frame we are scaling to is writable as well. */ av_frame_make_writable(context->current_frame); ffmpeg_sws_scale_frame(context->img_convert_ctx, context->current_frame, rgb_frame); diff --git a/source/blender/imbuf/movie/intern/movie_write.hh b/source/blender/imbuf/movie/intern/movie_write.hh index e5869afe668..57e2cfc74e0 100644 --- a/source/blender/imbuf/movie/intern/movie_write.hh +++ b/source/blender/imbuf/movie/intern/movie_write.hh @@ -17,7 +17,7 @@ # if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES) # define _USE_MATH_DEFINES # endif -# include +# include // IWYU pragma: keep extern "C" { # include