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/dds/dds_api.cpp
parentf1b1a0745f53564ed8eedd90d2de41cdf1d72836 (diff)
Cleanup: remove redundant return parenthesis
Diffstat (limited to 'source/blender/imbuf/intern/dds/dds_api.cpp')
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp32
1 files changed, 16 insertions, 16 deletions
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"