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-11-11 08:14:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-11 08:14:05 +0300
commita5f8071bdf7893ef487c677b460793e8bef55402 (patch)
tree50593a4a3f98a0fb0975e2346c6c78c55823eafb /source/blender/imbuf/intern/dds
parente9c19b28202eb1fdc774d62f23896bf9fafb0fb8 (diff)
Cleanup: use bool for imbuf save callbacks
Diffstat (limited to 'source/blender/imbuf/intern/dds')
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp10
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp
index e620c968f1c..d8bcca7e1f5 100644
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
@@ -42,16 +42,16 @@
extern "C" {
-int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/)
+bool imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/)
{
- return 0; /* todo: finish this function */
+ return false; /* todo: finish this function */
/* check image buffer */
if (ibuf == nullptr) {
- return 0;
+ return false;
}
if (ibuf->rect == nullptr) {
- return 0;
+ return false;
}
/* 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 true;
}
int imb_is_a_dds(const unsigned char *mem) /* note: use at most first 32 bytes */
diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h
index 930205c9efb..ca74cbeaa74 100644
--- a/source/blender/imbuf/intern/dds/dds_api.h
+++ b/source/blender/imbuf/intern/dds/dds_api.h
@@ -27,7 +27,7 @@ extern "C" {
#endif
int imb_is_a_dds(const unsigned char *mem); /* use only first 32 bytes of mem */
-int imb_save_dds(struct ImBuf *ibuf, const char *name, int flags);
+bool imb_save_dds(struct ImBuf *ibuf, const char *name, int flags);
struct ImBuf *imb_load_dds(const unsigned char *mem,
size_t size,
int flags,