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>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/imbuf/intern/writeimage.c
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/imbuf/intern/writeimage.c')
-rw-r--r--source/blender/imbuf/intern/writeimage.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index d6f2f801725..e93df7b73ba 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -22,7 +22,6 @@
* \ingroup imbuf
*/
-
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@@ -39,53 +38,54 @@
static bool prepare_write_imbuf(const ImFileType *type, ImBuf *ibuf)
{
- return IMB_prepare_write_ImBuf((type->flag & IM_FTYPE_FLOAT), ibuf);
+ return IMB_prepare_write_ImBuf((type->flag & IM_FTYPE_FLOAT), ibuf);
}
short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags)
{
- const ImFileType *type;
+ const ImFileType *type;
- errno = 0;
+ errno = 0;
- BLI_assert(!BLI_path_is_rel(name));
+ BLI_assert(!BLI_path_is_rel(name));
- if (ibuf == NULL) return (false);
- ibuf->flags = flags;
+ if (ibuf == NULL)
+ return (false);
+ ibuf->flags = flags;
- for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
- if (type->save && type->ftype(type, ibuf)) {
- short result = false;
+ for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
+ if (type->save && type->ftype(type, ibuf)) {
+ short result = false;
- prepare_write_imbuf(type, ibuf);
+ prepare_write_imbuf(type, ibuf);
- result = type->save(ibuf, name, flags);
+ result = type->save(ibuf, name, flags);
- return result;
- }
- }
+ return result;
+ }
+ }
- fprintf(stderr, "Couldn't save picture.\n");
+ fprintf(stderr, "Couldn't save picture.\n");
- return false;
+ return false;
}
bool IMB_prepare_write_ImBuf(const bool isfloat, ImBuf *ibuf)
{
- bool changed = false;
-
- if (isfloat) {
- /* pass */
- }
- else {
- if (ibuf->rect == NULL && ibuf->rect_float) {
- ibuf->rect_colorspace = colormanage_colorspace_get_roled(COLOR_ROLE_DEFAULT_BYTE);
- IMB_rect_from_float(ibuf);
- if (ibuf->rect != NULL) {
- changed = true;
- }
- }
- }
-
- return changed;
+ bool changed = false;
+
+ if (isfloat) {
+ /* pass */
+ }
+ else {
+ if (ibuf->rect == NULL && ibuf->rect_float) {
+ ibuf->rect_colorspace = colormanage_colorspace_get_roled(COLOR_ROLE_DEFAULT_BYTE);
+ IMB_rect_from_float(ibuf);
+ if (ibuf->rect != NULL) {
+ changed = true;
+ }
+ }
+ }
+
+ return changed;
}