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>2014-04-11 05:25:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-11 05:33:29 +0400
commita15b3c4d111613993eca23d5f99600c2052469e7 (patch)
tree18d4bcd4291013ecf12a24def023d6f7a73ebd65 /source/blender/imbuf
parent52af5fa31fbc0a1855a28d957d4387e5d6a15170 (diff)
Code cleanup: use bool
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/IMB_imbuf.h2
-rw-r--r--source/blender/imbuf/intern/divers.c2
-rw-r--r--source/blender/imbuf/intern/filter.c4
-rw-r--r--source/blender/imbuf/intern/targa.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index c941f1b065e..47f1864bd16 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -379,7 +379,7 @@ void IMB_interlace(struct ImBuf *ibuf);
void IMB_rect_from_float(struct ImBuf *ibuf);
/* Create char buffer for part of the image, color corrected if necessary,
* Changed part will be stored in buffer. This is expected to be used for texture painting updates */
-void IMB_partial_rect_from_float(struct ImBuf *ibuf, float *buffer, int x, int y, int w, int h, int is_data);
+void IMB_partial_rect_from_float(struct ImBuf *ibuf, float *buffer, int x, int y, int w, int h, bool is_data);
void IMB_float_from_rect(struct ImBuf *ibuf);
void IMB_color_to_bw(struct ImBuf *ibuf);
void IMB_saturation(struct ImBuf *ibuf, float sat);
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index ef1bc9eaafa..0bd5c5c6ed6 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -565,7 +565,7 @@ void IMB_rect_from_float(ImBuf *ibuf)
}
/* converts from linear float to sRGB byte for part of the texture, buffer will hold the changed part */
-void IMB_partial_rect_from_float(ImBuf *ibuf, float *buffer, int x, int y, int w, int h, int is_data)
+void IMB_partial_rect_from_float(ImBuf *ibuf, float *buffer, int x, int y, int w, int h, bool is_data)
{
float *rect_float;
uchar *rect_byte;
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index d0d7fc2448b..c7491a00a55 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -333,7 +333,7 @@ static int filter_make_index(const int x, const int y, const int w, const int h)
else return y * w + x;
}
-static int check_pixel_assigned(const void *buffer, const char *mask, const int index, const int depth, const int is_float)
+static int check_pixel_assigned(const void *buffer, const char *mask, const int index, const int depth, const bool is_float)
{
int res = 0;
@@ -364,7 +364,7 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter)
const int depth = 4; /* always 4 channels */
const int chsize = ibuf->rect_float ? sizeof(float) : sizeof(unsigned char);
const int bsize = width * height * depth * chsize;
- const int is_float = ibuf->rect_float != NULL;
+ const bool is_float = (ibuf->rect_float != NULL);
void *dstbuf = (void *) MEM_dupallocN(ibuf->rect_float ? (void *) ibuf->rect_float : (void *) ibuf->rect);
char *dstmask = mask == NULL ? NULL : (char *) MEM_dupallocN(mask);
void *srcbuf = ibuf->rect_float ? (void *) ibuf->rect_float : (void *) ibuf->rect;
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index 07c6bb6f84f..2dcb27a05d4 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -117,7 +117,7 @@ static int tga_out4(unsigned int data, FILE *file)
return ~EOF;
}
-static short makebody_tga(ImBuf *ibuf, FILE *file, int (*out)(unsigned int, FILE *))
+static bool makebody_tga(ImBuf *ibuf, FILE *file, int (*out)(unsigned int, FILE *))
{
register int last, this;
register int copy, bytes;
@@ -196,7 +196,7 @@ static short makebody_tga(ImBuf *ibuf, FILE *file, int (*out)(unsigned int, FILE
return 1;
}
-static int dumptarga(struct ImBuf *ibuf, FILE *file)
+static bool dumptarga(struct ImBuf *ibuf, FILE *file)
{
int size;
uchar *rect;
@@ -253,7 +253,7 @@ int imb_savetarga(struct ImBuf *ibuf, const char *name, int flags)
{
char buf[20] = {0};
FILE *fildes;
- short ok = 0;
+ bool ok = false;
(void)flags; /* unused */