Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-01-12 03:42:54 +0300
committerCampbell Barton <campbell@blender.org>2022-01-12 04:51:11 +0300
commit0dc309bef636e4da8ee3dad97eb8b27562138701 (patch)
tree936e74f248acbdbc4a62599fd06387954be369df /source/blender/imbuf
parentf4492629ea0e5018412d5634c7be898a09af8bf0 (diff)
Cleanup: remove redundant const qualifiers for POD types
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/IMB_imbuf.h30
-rw-r--r--source/blender/imbuf/IMB_metadata.h5
-rw-r--r--source/blender/imbuf/intern/IMB_filetype.h22
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.h2
-rw-r--r--source/blender/imbuf/intern/oiio/openimageio_api.h2
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.h2
6 files changed, 26 insertions, 37 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index c7481c6ea67..65d7631445d 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -544,7 +544,7 @@ bool IMB_prepare_write_ImBuf(bool isfloat, struct ImBuf *ibuf);
*/
bool IMB_ispic(const char *filepath);
bool IMB_ispic_type_matches(const char *filepath, int filetype);
-int IMB_ispic_type_from_memory(const unsigned char *buf, const size_t buf_size);
+int IMB_ispic_type_from_memory(const unsigned char *buf, size_t buf_size);
int IMB_ispic_type(const char *filepath);
/**
@@ -972,28 +972,20 @@ void IMB_update_gpu_texture_sub(struct GPUTexture *tex,
/**
* \attention defined in stereoimbuf.c
*/
-void IMB_stereo3d_write_dimensions(char mode,
- bool is_squeezed,
- const size_t width,
- const size_t height,
- size_t *r_width,
- size_t *r_height);
-void IMB_stereo3d_read_dimensions(char mode,
- bool is_squeezed,
- const size_t width,
- const size_t height,
- size_t *r_width,
- size_t *r_height);
+void IMB_stereo3d_write_dimensions(
+ char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height);
+void IMB_stereo3d_read_dimensions(
+ char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height);
int *IMB_stereo3d_from_rect(struct ImageFormatData *im_format,
- const size_t x,
- const size_t y,
- const size_t channels,
+ size_t x,
+ size_t y,
+ size_t channels,
int *rect_left,
int *rect_right);
float *IMB_stereo3d_from_rectf(struct ImageFormatData *im_format,
- const size_t x,
- const size_t y,
- const size_t channels,
+ size_t x,
+ size_t y,
+ size_t channels,
float *rectf_left,
float *rectf_right);
/**
diff --git a/source/blender/imbuf/IMB_metadata.h b/source/blender/imbuf/IMB_metadata.h
index 652ce913ee5..50982d08c3e 100644
--- a/source/blender/imbuf/IMB_metadata.h
+++ b/source/blender/imbuf/IMB_metadata.h
@@ -58,10 +58,7 @@ void IMB_metadata_free(struct IDProperty *metadata);
* \param len: length of value buffer allocated by user.
* \return 1 (true) if metadata is present and value for the key found, 0 (false) otherwise.
*/
-bool IMB_metadata_get_field(struct IDProperty *metadata,
- const char *key,
- char *value,
- const size_t len);
+bool IMB_metadata_get_field(struct IDProperty *metadata, const char *key, char *value, size_t len);
/**
* Set user data in the metadata.
diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h
index 104458ffa7a..bf6aef3ecd3 100644
--- a/source/blender/imbuf/intern/IMB_filetype.h
+++ b/source/blender/imbuf/intern/IMB_filetype.h
@@ -41,7 +41,7 @@ typedef struct ImFileType {
* \note that this may only read in a small part of the files header,
* see: #IMB_ispic_type for details.
*/
- bool (*is_a)(const unsigned char *buf, const size_t size);
+ bool (*is_a)(const unsigned char *buf, size_t size);
/** Load an image from memory. */
struct ImBuf *(*load)(const unsigned char *mem,
@@ -93,7 +93,7 @@ void imb_tile_cache_tile_free(struct ImBuf *ibuf, int tx, int ty);
/** \name Format: PNG (#IMB_FTYPE_PNG)
* \{ */
-bool imb_is_a_png(const unsigned char *mem, const size_t size);
+bool imb_is_a_png(const unsigned char *mem, size_t size);
struct ImBuf *imb_loadpng(const unsigned char *mem,
size_t size,
int flags,
@@ -106,7 +106,7 @@ bool imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags);
/** \name Format: TARGA (#IMB_FTYPE_TGA)
* \{ */
-bool imb_is_a_targa(const unsigned char *buf, const size_t size);
+bool imb_is_a_targa(const unsigned char *buf, size_t size);
struct ImBuf *imb_loadtarga(const unsigned char *mem,
size_t size,
int flags,
@@ -119,7 +119,7 @@ bool imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags);
/** \name Format: IRIS (#IMB_FTYPE_IMAGIC)
* \{ */
-bool imb_is_a_iris(const unsigned char *mem, const size_t size);
+bool imb_is_a_iris(const unsigned char *mem, size_t size);
/**
* Read in a B/W RGB or RGBA iris image file and return an image buffer.
*/
@@ -135,7 +135,7 @@ bool imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags);
/** \name Format: JP2 (#IMB_FTYPE_JP2)
* \{ */
-bool imb_is_a_jp2(const unsigned char *buf, const size_t size);
+bool imb_is_a_jp2(const unsigned char *buf, size_t size);
struct ImBuf *imb_load_jp2(const unsigned char *mem,
size_t size,
int flags,
@@ -151,7 +151,7 @@ bool imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags);
/** \name Format: JPEG (#IMB_FTYPE_JPG)
* \{ */
-bool imb_is_a_jpeg(const unsigned char *mem, const size_t size);
+bool imb_is_a_jpeg(const unsigned char *mem, size_t size);
bool imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags);
struct ImBuf *imb_load_jpeg(const unsigned char *buffer,
size_t size,
@@ -164,7 +164,7 @@ struct ImBuf *imb_load_jpeg(const unsigned char *buffer,
/** \name Format: BMP (#IMB_FTYPE_BMP)
* \{ */
-bool imb_is_a_bmp(const unsigned char *buf, const size_t size);
+bool imb_is_a_bmp(const unsigned char *buf, size_t size);
struct ImBuf *imb_bmp_decode(const unsigned char *mem,
size_t size,
int flags,
@@ -178,7 +178,7 @@ bool imb_savebmp(struct ImBuf *ibuf, const char *filepath, int flags);
/** \name Format: CINEON (#IMB_FTYPE_CINEON)
* \{ */
-bool imb_is_a_cineon(const unsigned char *buf, const size_t size);
+bool imb_is_a_cineon(const unsigned char *buf, size_t size);
bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags);
struct ImBuf *imb_load_cineon(const unsigned char *mem,
size_t size,
@@ -191,7 +191,7 @@ struct ImBuf *imb_load_cineon(const unsigned char *mem,
/** \name Format: DPX (#IMB_FTYPE_DPX)
* \{ */
-bool imb_is_a_dpx(const unsigned char *buf, const size_t size);
+bool imb_is_a_dpx(const unsigned char *buf, size_t size);
bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags);
struct ImBuf *imb_load_dpx(const unsigned char *mem,
size_t size,
@@ -204,7 +204,7 @@ struct ImBuf *imb_load_dpx(const unsigned char *mem,
/** \name Format: HDR (#IMB_FTYPE_RADHDR)
* \{ */
-bool imb_is_a_hdr(const unsigned char *buf, const size_t size);
+bool imb_is_a_hdr(const unsigned char *buf, size_t size);
struct ImBuf *imb_loadhdr(const unsigned char *mem,
size_t size,
int flags,
@@ -218,7 +218,7 @@ bool imb_savehdr(struct ImBuf *ibuf, const char *filepath, int flags);
* \{ */
void imb_inittiff(void);
-bool imb_is_a_tiff(const unsigned char *buf, const size_t size);
+bool imb_is_a_tiff(const unsigned char *buf, size_t size);
/**
* Loads a TIFF file.
* \param mem: Memory containing the TIFF file.
diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h
index 931c4f267f9..2d540f13a52 100644
--- a/source/blender/imbuf/intern/dds/dds_api.h
+++ b/source/blender/imbuf/intern/dds/dds_api.h
@@ -26,7 +26,7 @@
extern "C" {
#endif
-bool imb_is_a_dds(const unsigned char *mem, const size_t size);
+bool imb_is_a_dds(const unsigned char *mem, size_t size);
bool imb_save_dds(struct ImBuf *ibuf, const char *name, int flags);
struct ImBuf *imb_load_dds(const unsigned char *mem,
size_t size,
diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.h b/source/blender/imbuf/intern/oiio/openimageio_api.h
index 659050cdb00..1201bd1b5e0 100644
--- a/source/blender/imbuf/intern/oiio/openimageio_api.h
+++ b/source/blender/imbuf/intern/oiio/openimageio_api.h
@@ -31,7 +31,7 @@ extern "C" {
struct ImBuf;
-bool imb_is_a_photoshop(const unsigned char *mem, const size_t size);
+bool imb_is_a_photoshop(const unsigned char *mem, size_t size);
int imb_save_photoshop(struct ImBuf *ibuf, const char *name, int flags);
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h
index 14336620926..4321c95db30 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.h
+++ b/source/blender/imbuf/intern/openexr/openexr_api.h
@@ -36,7 +36,7 @@ void imb_exitopenexr(void);
* Test presence of OpenEXR file.
* \param mem: pointer to loaded OpenEXR bit-stream.
*/
-bool imb_is_a_openexr(const unsigned char *mem, const size_t size);
+bool imb_is_a_openexr(const unsigned char *mem, size_t size);
bool imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags);