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 <ideasman42@gmail.com>2020-08-08 04:02:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-08 06:37:55 +0300
commit586a3084677b03e314a906ffdac3560a24058409 (patch)
treeb2b920b14e5408b09556c514814e82a188a1d38d /source/blender/imbuf/intern
parentf1b1a0745f53564ed8eedd90d2de41cdf1d72836 (diff)
Cleanup: remove redundant return parenthesis
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c4
-rw-r--r--source/blender/imbuf/intern/anim_movie.c28
-rw-r--r--source/blender/imbuf/intern/bmp.c6
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.cpp2
-rw-r--r--source/blender/imbuf/intern/dds/Stream.cpp20
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp32
-rw-r--r--source/blender/imbuf/intern/iris.c12
-rw-r--r--source/blender/imbuf/intern/jpeg.c6
-rw-r--r--source/blender/imbuf/intern/oiio/openimageio_api.cpp6
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp6
-rw-r--r--source/blender/imbuf/intern/png.c10
-rw-r--r--source/blender/imbuf/intern/scaling.c88
-rw-r--r--source/blender/imbuf/intern/tiff.c22
-rw-r--r--source/blender/imbuf/intern/util.c20
-rw-r--r--source/blender/imbuf/intern/writeimage.c2
15 files changed, 132 insertions, 132 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 4205a6ecc39..8dfb3ada7d6 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -488,7 +488,7 @@ ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar planes, unsigned int
}
}
- return (ibuf);
+ return ibuf;
}
bool IMB_initImBuf(
@@ -623,7 +623,7 @@ ImBuf *IMB_dupImBuf(const ImBuf *ibuf1)
*ibuf2 = tbuf;
- return (ibuf2);
+ return ibuf2;
}
size_t IMB_get_size_in_memory(ImBuf *ibuf)
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 01372d5ed68..f5ae602946e 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -301,7 +301,7 @@ struct anim *IMB_open_anim(const char *name,
anim->ib_flags = ib_flags;
anim->streamindex = streamindex;
}
- return (anim);
+ return anim;
}
bool IMB_anim_can_produce_frames(const struct anim *anim)
@@ -743,7 +743,7 @@ static int startffmpeg(struct anim *anim)
}
# endif
- return (0);
+ return 0;
}
/* postprocess the image in anim->pFrame and do color conversion
@@ -1060,7 +1060,7 @@ static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position, IMB_Timecode_Typ
int old_frame_index = 0; /* To quiet gcc barking... */
if (anim == NULL) {
- return (0);
+ return 0;
}
av_log(anim->pFormatCtx, AV_LOG_DEBUG, "FETCH: pos=%d\n", position);
@@ -1291,7 +1291,7 @@ static ImBuf *anim_getnew(struct anim *anim)
struct ImBuf *ibuf = NULL;
if (anim == NULL) {
- return (NULL);
+ return NULL;
}
free_anim_movie(anim);
@@ -1305,7 +1305,7 @@ static ImBuf *anim_getnew(struct anim *anim)
#endif
if (anim->curtype != 0) {
- return (NULL);
+ return NULL;
}
anim->curtype = imb_get_anim_type(anim->name);
@@ -1319,7 +1319,7 @@ static ImBuf *anim_getnew(struct anim *anim)
break;
case ANIM_MOVIE:
if (startmovie(anim)) {
- return (NULL);
+ return NULL;
}
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0); /* fake */
break;
@@ -1327,7 +1327,7 @@ static ImBuf *anim_getnew(struct anim *anim)
case ANIM_AVI:
if (startavi(anim)) {
printf("couldn't start avi\n");
- return (NULL);
+ return NULL;
}
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
break;
@@ -1335,13 +1335,13 @@ static ImBuf *anim_getnew(struct anim *anim)
#ifdef WITH_FFMPEG
case ANIM_FFMPEG:
if (startffmpeg(anim)) {
- return (0);
+ return 0;
}
ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
break;
#endif
}
- return (ibuf);
+ return ibuf;
}
struct ImBuf *IMB_anim_previewframe(struct anim *anim)
@@ -1369,7 +1369,7 @@ struct ImBuf *IMB_anim_absolute(struct anim *anim,
int pic;
int filter_y;
if (anim == NULL) {
- return (NULL);
+ return NULL;
}
filter_y = (anim->ib_flags & IB_animdeinterlace);
@@ -1378,7 +1378,7 @@ struct ImBuf *IMB_anim_absolute(struct anim *anim,
if (anim->curtype == 0) {
ibuf = anim_getnew(anim);
if (ibuf == NULL) {
- return (NULL);
+ return NULL;
}
IMB_freeImBuf(ibuf); /* ???? */
@@ -1386,10 +1386,10 @@ struct ImBuf *IMB_anim_absolute(struct anim *anim,
}
if (position < 0) {
- return (NULL);
+ return NULL;
}
if (position >= anim->duration_in_frames) {
- return (NULL);
+ return NULL;
}
}
else {
@@ -1444,7 +1444,7 @@ struct ImBuf *IMB_anim_absolute(struct anim *anim,
}
BLI_snprintf(ibuf->name, sizeof(ibuf->name), "%s.%04d", anim->name, anim->curposition + 1);
}
- return (ibuf);
+ return ibuf;
}
/***/
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index 3cac0be7935..31f8b651eff 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -101,7 +101,7 @@ static int checkbmp(const uchar *mem)
}
}
- return (ret_val);
+ return ret_val;
}
int imb_is_a_bmp(const uchar *buf)
@@ -123,7 +123,7 @@ ImBuf *imb_bmp_decode(const uchar *mem, size_t size, int flags, char colorspace[
(void)size; /* unused */
if (checkbmp(mem) == 0) {
- return (NULL);
+ return NULL;
}
colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE);
@@ -272,7 +272,7 @@ ImBuf *imb_bmp_decode(const uchar *mem, size_t size, int flags, char colorspace[
ibuf->ftype = IMB_FTYPE_BMP;
}
- return (ibuf);
+ return ibuf;
}
#undef CHECK_HEADER_FIELD_BMP
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
index 92dd475813a..7ec059607c5 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
@@ -1353,7 +1353,7 @@ uint DirectDrawSurface::mipmapSize(uint mipmap) const
}
printf("DDS: mipmap format not supported\n");
- return (0);
+ return 0;
}
uint DirectDrawSurface::faceSize() const
diff --git a/source/blender/imbuf/intern/dds/Stream.cpp b/source/blender/imbuf/intern/dds/Stream.cpp
index 271717f165c..e1c5eb1d505 100644
--- a/source/blender/imbuf/intern/dds/Stream.cpp
+++ b/source/blender/imbuf/intern/dds/Stream.cpp
@@ -42,55 +42,55 @@ unsigned int mem_read(Stream &mem, unsigned long long &i)
{
if (mem.pos + 8 > mem.size) {
mem.set_failed(msg_error_seek);
- return (0);
+ return 0;
}
memcpy(&i, mem.mem + mem.pos, 8); // @@ todo: make sure little endian
mem.pos += 8;
- return (8);
+ return 8;
}
unsigned int mem_read(Stream &mem, unsigned int &i)
{
if (mem.pos + 4 > mem.size) {
mem.set_failed(msg_error_read);
- return (0);
+ return 0;
}
memcpy(&i, mem.mem + mem.pos, 4); // @@ todo: make sure little endian
mem.pos += 4;
- return (4);
+ return 4;
}
unsigned int mem_read(Stream &mem, unsigned short &i)
{
if (mem.pos + 2 > mem.size) {
mem.set_failed(msg_error_read);
- return (0);
+ return 0;
}
memcpy(&i, mem.mem + mem.pos, 2); // @@ todo: make sure little endian
mem.pos += 2;
- return (2);
+ return 2;
}
unsigned int mem_read(Stream &mem, unsigned char &i)
{
if (mem.pos + 1 > mem.size) {
mem.set_failed(msg_error_read);
- return (0);
+ return 0;
}
i = (mem.mem + mem.pos)[0];
mem.pos += 1;
- return (1);
+ return 1;
}
unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int cnt)
{
if (mem.pos + cnt > mem.size) {
mem.set_failed(msg_error_read);
- return (0);
+ return 0;
}
memcpy(i, mem.mem + mem.pos, cnt);
mem.pos += cnt;
- return (cnt);
+ return cnt;
}
void Stream::set_failed(const char *msg)
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp
index 83d304203a0..309b5d6410f 100644
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
@@ -44,14 +44,14 @@ extern "C" {
int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/)
{
- return (0); /* todo: finish this function */
+ return 0; /* todo: finish this function */
/* check image buffer */
if (ibuf == 0) {
- return (0);
+ return 0;
}
if (ibuf->rect == 0) {
- return (0);
+ return 0;
}
/* open file for writing */
@@ -69,7 +69,7 @@ int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/)
fildes << "DDS ";
fildes.close();
- return (1);
+ return 1;
}
int imb_is_a_dds(const unsigned char *mem) // note: use at most first 32 bytes
@@ -77,13 +77,13 @@ int imb_is_a_dds(const unsigned char *mem) // note: use at most first 32 bytes
/* heuristic check to see if mem contains a DDS file */
/* header.fourcc == FOURCC_DDS */
if ((mem[0] != 'D') || (mem[1] != 'D') || (mem[2] != 'S') || (mem[3] != ' ')) {
- return (0);
+ return 0;
}
/* header.size == 124 */
if ((mem[4] != 124) || mem[5] || mem[6] || mem[7]) {
- return (0);
+ return 0;
}
- return (1);
+ return 1;
}
struct ImBuf *imb_load_dds(const unsigned char *mem,
@@ -109,27 +109,27 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE);
if (!imb_is_a_dds(mem)) {
- return (0);
+ return 0;
}
/* check if DDS is valid and supported */
if (!dds.isValid()) {
/* no need to print error here, just testing if it is a DDS */
if (flags & IB_test) {
- return (0);
+ return 0;
}
printf("DDS: not valid; header follows\n");
dds.printInfo();
- return (0);
+ return 0;
}
if (!dds.isSupported()) {
printf("DDS: format not supported\n");
- return (0);
+ return 0;
}
if ((dds.width() > 65535) || (dds.height() > 65535)) {
printf("DDS: dimensions too large\n");
- return (0);
+ return 0;
}
/* convert DDS into ImBuf */
@@ -149,7 +149,7 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
}
ibuf = IMB_allocImBuf(dds.width(), dds.height(), bits_per_pixel, 0);
if (ibuf == 0) {
- return (0); /* memory allocation failed */
+ return 0; /* memory allocation failed */
}
ibuf->ftype = IMB_FTYPE_DDS;
@@ -158,10 +158,10 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
if ((flags & IB_test) == 0) {
if (!imb_addrectImBuf(ibuf)) {
- return (ibuf);
+ return ibuf;
}
if (ibuf->rect == 0) {
- return (ibuf);
+ return ibuf;
}
rect = ibuf->rect;
@@ -196,7 +196,7 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
IMB_flipy(ibuf);
}
- return (ibuf);
+ return ibuf;
}
} // extern "C"
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index 5f698543aa9..2d8f1510d7b 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -281,18 +281,18 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors
readheader(inf, &image);
if (image.imagic != IMAGIC) {
fprintf(stderr, "longimagedata: bad magic number in image file\n");
- return (NULL);
+ return NULL;
}
rle = ISRLE(image.type);
bpp = BPP(image.type);
if (bpp != 1 && bpp != 2) {
fprintf(stderr, "longimagedata: image must have 1 or 2 byte per pix chan\n");
- return (NULL);
+ return NULL;
}
if ((uint)image.zsize > 8) {
fprintf(stderr, "longimagedata: channels over 8 not supported\n");
- return (NULL);
+ return NULL;
}
const int xsize = image.xsize;
@@ -304,7 +304,7 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors
if (ibuf) {
ibuf->ftype = IMB_FTYPE_IMAGIC;
}
- return (ibuf);
+ return ibuf;
}
if (rle) {
@@ -598,7 +598,7 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors
IMB_convert_rgba_to_abgr(ibuf);
}
- return (ibuf);
+ return ibuf;
}
/* static utility functions for longimagedata */
@@ -988,5 +988,5 @@ int imb_saveiris(struct ImBuf *ibuf, const char *name, int flags)
IMB_convert_rgba_to_abgr(ibuf);
test_endian_zbuf(ibuf);
- return (ret);
+ return ret;
}
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index fe74d9bc23f..89026c2f728 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -417,7 +417,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla
}
}
- return (ibuf);
+ return ibuf;
}
ImBuf *imb_load_jpeg(const unsigned char *buffer,
@@ -452,7 +452,7 @@ ImBuf *imb_load_jpeg(const unsigned char *buffer,
ibuf = ibJpegImageFromCinfo(cinfo, flags);
- return (ibuf);
+ return ibuf;
}
static void write_jpeg(struct jpeg_compress_struct *cinfo, struct ImBuf *ibuf)
@@ -605,7 +605,7 @@ static int init_jpeg(FILE *outfile, struct jpeg_compress_struct *cinfo, struct I
cinfo->dct_method = JDCT_FLOAT;
jpeg_set_quality(cinfo, quality, true);
- return (0);
+ return 0;
}
static int save_stdjpeg(const char *name, struct ImBuf *ibuf)
diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
index df51aada5f0..86bb5934db6 100644
--- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp
+++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
@@ -182,10 +182,10 @@ int imb_save_photoshop(struct ImBuf *ibuf, const char * /*name*/, int flags)
<< " currently not supported" << std::endl;
imb_addencodedbufferImBuf(ibuf);
ibuf->encodedsize = 0;
- return (0);
+ return 0;
}
- return (0);
+ return 0;
}
struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspace[IM_MAX_SPACE])
@@ -199,7 +199,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac
/* load image from file through OIIO */
if (imb_is_a_photoshop(filename) == 0) {
- return (NULL);
+ return NULL;
}
colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE);
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 05592a7d408..77d60d37449 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1900,7 +1900,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
MultiPartInputFile *file = NULL;
if (imb_is_a_openexr(mem) == 0) {
- return (NULL);
+ return NULL;
}
colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_FLOAT);
@@ -2073,7 +2073,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
ibuf->flags |= IB_alphamode_premul;
}
}
- return (ibuf);
+ return ibuf;
}
catch (const std::exception &exc) {
std::cerr << exc.what() << std::endl;
@@ -2083,7 +2083,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
delete file;
delete membuf;
- return (0);
+ return 0;
}
}
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index 9e600f363c5..2eb1b216572 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -71,7 +71,7 @@ int imb_is_a_png(const unsigned char *mem)
ret_val = !png_sig_cmp(mem, 0, 8);
#endif
}
- return (ret_val);
+ return ret_val;
}
static void Flush(png_structp png_ptr)
@@ -161,7 +161,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
bytesperpixel = (ibuf->planes + 7) >> 3;
if ((bytesperpixel > 4) || (bytesperpixel == 2)) {
printf("imb_savepng: Unsupported bytes per pixel: %d for file: '%s'\n", bytesperpixel, name);
- return (0);
+ return 0;
}
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
@@ -511,7 +511,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
fclose(fp);
}
- return (1);
+ return 1;
}
static void imb_png_warning(png_structp UNUSED(png_ptr), png_const_charp message)
@@ -549,7 +549,7 @@ ImBuf *imb_loadpng(const unsigned char *mem, size_t size, int flags, char colors
unsigned int channels;
if (imb_is_a_png(mem) == 0) {
- return (NULL);
+ return NULL;
}
/* both 8 and 16 bit PNGs are default to standard byte colorspace */
@@ -819,5 +819,5 @@ ImBuf *imb_loadpng(const unsigned char *mem, size_t size, int flags, char colors
}
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
- return (ibuf);
+ return ibuf;
}
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index 95f720a9d16..cecb683b0bd 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -99,10 +99,10 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
struct ImBuf *ibuf2;
if (ibuf1 == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->rect == NULL && ibuf1->rect_float == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->x <= 1) {
@@ -111,12 +111,12 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
ibuf2 = IMB_allocImBuf((ibuf1->x) / 2, ibuf1->y, ibuf1->planes, ibuf1->flags);
if (ibuf2 == NULL) {
- return (NULL);
+ return NULL;
}
imb_half_x_no_alloc(ibuf2, ibuf1);
- return (ibuf2);
+ return ibuf2;
}
struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
@@ -126,10 +126,10 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
float *p1f, *destf;
if (ibuf1 == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->rect == NULL && ibuf1->rect_float == NULL) {
- return (NULL);
+ return NULL;
}
do_rect = (ibuf1->rect != NULL);
@@ -137,7 +137,7 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
ibuf2 = IMB_allocImBuf(2 * ibuf1->x, ibuf1->y, ibuf1->planes, ibuf1->flags);
if (ibuf2 == NULL) {
- return (NULL);
+ return NULL;
}
p1 = (int *)ibuf1->rect;
@@ -161,7 +161,7 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
}
}
- return (ibuf2);
+ return ibuf2;
}
struct ImBuf *IMB_double_x(struct ImBuf *ibuf1)
@@ -169,16 +169,16 @@ struct ImBuf *IMB_double_x(struct ImBuf *ibuf1)
struct ImBuf *ibuf2;
if (ibuf1 == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->rect == NULL && ibuf1->rect_float == NULL) {
- return (NULL);
+ return NULL;
}
ibuf2 = IMB_double_fast_x(ibuf1);
imb_filterx(ibuf2);
- return (ibuf2);
+ return ibuf2;
}
static void imb_half_y_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1)
@@ -253,10 +253,10 @@ struct ImBuf *IMB_half_y(struct ImBuf *ibuf1)
struct ImBuf *ibuf2;
if (ibuf1 == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->rect == NULL && ibuf1->rect_float == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->y <= 1) {
@@ -265,12 +265,12 @@ struct ImBuf *IMB_half_y(struct ImBuf *ibuf1)
ibuf2 = IMB_allocImBuf(ibuf1->x, (ibuf1->y) / 2, ibuf1->planes, ibuf1->flags);
if (ibuf2 == NULL) {
- return (NULL);
+ return NULL;
}
imb_half_y_no_alloc(ibuf2, ibuf1);
- return (ibuf2);
+ return ibuf2;
}
struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
@@ -282,10 +282,10 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
int do_rect, do_float;
if (ibuf1 == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->rect == NULL && ibuf1->rect_float == NULL) {
- return (NULL);
+ return NULL;
}
do_rect = (ibuf1->rect != NULL);
@@ -293,7 +293,7 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
ibuf2 = IMB_allocImBuf(ibuf1->x, 2 * ibuf1->y, ibuf1->planes, ibuf1->flags);
if (ibuf2 == NULL) {
- return (NULL);
+ return NULL;
}
p1 = (int *)ibuf1->rect;
@@ -318,7 +318,7 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
}
}
- return (ibuf2);
+ return ibuf2;
}
struct ImBuf *IMB_double_y(struct ImBuf *ibuf1)
@@ -326,16 +326,16 @@ struct ImBuf *IMB_double_y(struct ImBuf *ibuf1)
struct ImBuf *ibuf2;
if (ibuf1 == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->rect == NULL) {
- return (NULL);
+ return NULL;
}
ibuf2 = IMB_double_fast_y(ibuf1);
IMB_filtery(ibuf2);
- return (ibuf2);
+ return ibuf2;
}
/* pretty much specific functions which converts uchar <-> ushort but assumes
@@ -453,10 +453,10 @@ ImBuf *IMB_onehalf(struct ImBuf *ibuf1)
struct ImBuf *ibuf2;
if (ibuf1 == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->rect == NULL && ibuf1->rect_float == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf1->x <= 1) {
@@ -468,12 +468,12 @@ ImBuf *IMB_onehalf(struct ImBuf *ibuf1)
ibuf2 = IMB_allocImBuf((ibuf1->x) / 2, (ibuf1->y) / 2, ibuf1->planes, ibuf1->flags);
if (ibuf2 == NULL) {
- return (NULL);
+ return NULL;
}
imb_onehalf_no_alloc(ibuf2, ibuf1);
- return (ibuf2);
+ return ibuf2;
}
/* q_scale_linear_interpolation helper functions */
@@ -923,13 +923,13 @@ static ImBuf *scaledownx(struct ImBuf *ibuf, int newx)
nvalf[0] = nvalf[1] = nvalf[2] = nvalf[3] = 0.0f;
if (!do_rect && !do_float) {
- return (ibuf);
+ return ibuf;
}
if (do_rect) {
_newrect = MEM_mallocN(newx * ibuf->y * sizeof(uchar) * 4, "scaledownx");
if (_newrect == NULL) {
- return (ibuf);
+ return ibuf;
}
}
if (do_float) {
@@ -938,7 +938,7 @@ static ImBuf *scaledownx(struct ImBuf *ibuf, int newx)
if (_newrect) {
MEM_freeN(_newrect);
}
- return (ibuf);
+ return ibuf;
}
}
@@ -1044,7 +1044,7 @@ static ImBuf *scaledownx(struct ImBuf *ibuf, int newx)
(void)rect_size; /* UNUSED in release builds */
ibuf->x = newx;
- return (ibuf);
+ return ibuf;
}
static ImBuf *scaledowny(struct ImBuf *ibuf, int newy)
@@ -1064,13 +1064,13 @@ static ImBuf *scaledowny(struct ImBuf *ibuf, int newy)
nvalf[0] = nvalf[1] = nvalf[2] = nvalf[3] = 0.0f;
if (!do_rect && !do_float) {
- return (ibuf);
+ return ibuf;
}
if (do_rect) {
_newrect = MEM_mallocN(newy * ibuf->x * sizeof(uchar) * 4, "scaledowny");
if (_newrect == NULL) {
- return (ibuf);
+ return ibuf;
}
}
if (do_float) {
@@ -1079,7 +1079,7 @@ static ImBuf *scaledowny(struct ImBuf *ibuf, int newy)
if (_newrect) {
MEM_freeN(_newrect);
}
- return (ibuf);
+ return ibuf;
}
}
@@ -1186,7 +1186,7 @@ static ImBuf *scaledowny(struct ImBuf *ibuf, int newy)
(void)rect_size; /* UNUSED in release builds */
ibuf->y = newy;
- return (ibuf);
+ return ibuf;
}
static ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
@@ -1210,17 +1210,17 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
val_af = nval_af = diff_af = val_bf = nval_bf = diff_bf = 0;
val_gf = nval_gf = diff_gf = val_rf = nval_rf = diff_rf = 0;
if (ibuf == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf->rect == NULL && ibuf->rect_float == NULL) {
- return (ibuf);
+ return ibuf;
}
if (ibuf->rect) {
do_rect = true;
_newrect = MEM_mallocN(newx * ibuf->y * sizeof(int), "scaleupx");
if (_newrect == NULL) {
- return (ibuf);
+ return ibuf;
}
}
if (ibuf->rect_float) {
@@ -1230,7 +1230,7 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
if (_newrect) {
MEM_freeN(_newrect);
}
- return (ibuf);
+ return ibuf;
}
}
@@ -1362,7 +1362,7 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
}
ibuf->x = newx;
- return (ibuf);
+ return ibuf;
}
static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
@@ -1386,17 +1386,17 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
val_af = nval_af = diff_af = val_bf = nval_bf = diff_bf = 0;
val_gf = nval_gf = diff_gf = val_rf = nval_rf = diff_rf = 0;
if (ibuf == NULL) {
- return (NULL);
+ return NULL;
}
if (ibuf->rect == NULL && ibuf->rect_float == NULL) {
- return (ibuf);
+ return ibuf;
}
if (ibuf->rect) {
do_rect = true;
_newrect = MEM_mallocN(ibuf->x * newy * sizeof(int), "scaleupy");
if (_newrect == NULL) {
- return (ibuf);
+ return ibuf;
}
}
if (ibuf->rect_float) {
@@ -1406,7 +1406,7 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
if (_newrect) {
MEM_freeN(_newrect);
}
- return (ibuf);
+ return ibuf;
}
}
@@ -1545,7 +1545,7 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
}
ibuf->y = newy;
- return (ibuf);
+ return ibuf;
}
static void scalefast_Z_ImBuf(ImBuf *ibuf, int newx, int newy)
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 5d72066675b..c95476fa628 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -104,7 +104,7 @@ static int imb_tiff_DummyMapProc(
(void)pbase;
(void)psize;
- return (0);
+ return 0;
}
/**
@@ -145,7 +145,7 @@ static tsize_t imb_tiff_ReadProc(thandle_t handle, tdata_t data, tsize_t n)
/* on EOF, return immediately and read (copy) nothing */
if (nCopy <= 0) {
- return (0);
+ return 0;
}
/* all set -> do the read (copy) */
@@ -238,7 +238,7 @@ static int imb_tiff_CloseProc(thandle_t handle)
mfile = IMB_TIFF_GET_MEMFILE(handle);
if (!mfile || !mfile->mem) {
fprintf(stderr, "imb_tiff_CloseProc: !mfile || !mfile->mem!\n");
- return (0);
+ return 0;
}
/* virtually close the file */
@@ -246,7 +246,7 @@ static int imb_tiff_CloseProc(thandle_t handle)
mfile->offset = 0;
mfile->size = 0;
- return (0);
+ return 0;
}
/**
@@ -262,7 +262,7 @@ static toff_t imb_tiff_SizeProc(thandle_t handle)
mfile = IMB_TIFF_GET_MEMFILE(handle);
if (!mfile || !mfile->mem) {
fprintf(stderr, "imb_tiff_SizeProc: !mfile || !mfile->mem!\n");
- return (0);
+ return 0;
}
/* return the size */
@@ -764,7 +764,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
"imb_savetiff: unsupported number of bytes per "
"pixel: %d\n",
samplesperpixel);
- return (0);
+ return 0;
}
if ((ibuf->foptions.flag & TIF_16BIT) && ibuf->rect_float) {
@@ -790,7 +790,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
fprintf(stderr,
"imb_savetiff: creation of in-memory TIFF files is "
"not yet supported.\n");
- return (0);
+ return 0;
}
/* create image as a file */
@@ -804,7 +804,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
if (image == NULL) {
fprintf(stderr, "imb_savetiff: could not open TIFF for writing.\n");
- return (0);
+ return 0;
}
/* allocate array for pixel data */
@@ -819,7 +819,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
if (pixels == NULL && pixels16 == NULL) {
fprintf(stderr, "imb_savetiff: could not allocate pixels array.\n");
TIFFClose(image);
- return (0);
+ return 0;
}
/* setup pointers */
@@ -945,7 +945,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
if (pixels16) {
_TIFFfree(pixels16);
}
- return (1);
+ return 1;
}
/* close the TIFF file */
@@ -956,5 +956,5 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
if (pixels16) {
_TIFFfree(pixels16);
}
- return (1);
+ return 1;
}
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 3c420f3f297..64b03f332a8 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -339,42 +339,42 @@ int imb_get_anim_type(const char *name)
# ifdef WITH_FFMPEG
/* stat test below fails on large files > 4GB */
if (isffmpeg(name)) {
- return (ANIM_FFMPEG);
+ return ANIM_FFMPEG;
}
# endif
if (BLI_stat(name, &st) == -1) {
- return (0);
+ return 0;
}
if (((st.st_mode) & S_IFMT) != S_IFREG) {
- return (0);
+ return 0;
}
if (isavi(name)) {
- return (ANIM_AVI);
+ return ANIM_AVI;
}
if (ismovie(name)) {
- return (ANIM_MOVIE);
+ return ANIM_MOVIE;
}
#else
if (BLI_stat(name, &st) == -1) {
- return (0);
+ return 0;
}
if (((st.st_mode) & S_IFMT) != S_IFREG) {
- return (0);
+ return 0;
}
if (ismovie(name)) {
- return (ANIM_MOVIE);
+ return ANIM_MOVIE;
}
# ifdef WITH_FFMPEG
if (isffmpeg(name)) {
- return (ANIM_FFMPEG);
+ return ANIM_FFMPEG;
}
# endif
if (isavi(name)) {
- return (ANIM_AVI);
+ return ANIM_AVI;
}
#endif
type = IMB_ispic(name);
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index 9cb0436cb98..1d77233a7e2 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -50,7 +50,7 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags)
BLI_assert(!BLI_path_is_rel(name));
if (ibuf == NULL) {
- return (false);
+ return false;
}
ibuf->flags = flags;