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>2012-05-19 17:28:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-19 17:28:19 +0400
commitaf3e348430218e609c80d86c8dd418bed15e70e8 (patch)
treea93e0453c8fe47a954594060cc5bbda90214a7f3 /source/blender/imbuf
parent2f5173887e0c7f6ba19664f16b177e575d82a241 (diff)
code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/indexer.c4
-rw-r--r--source/blender/imbuf/intern/jp2.c4
-rw-r--r--source/blender/imbuf/intern/scaling.c20
3 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 74fa7c5987e..11da2f4af91 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -867,7 +867,7 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
if (*progress != next_progress) {
*progress = next_progress;
- *do_update = 1;
+ *do_update = TRUE;
}
if (*stop) {
@@ -1075,7 +1075,7 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context,
if (*progress != next_progress) {
*progress = next_progress;
- *do_update = 1;
+ *do_update = TRUE;
}
if (*stop) {
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index 4f71f296caa..3af853ba150 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -97,7 +97,7 @@ static void info_callback(const char *msg, void *client_data)
struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
{
struct ImBuf *ibuf = NULL;
- int use_float = 0; /* for precision higher then 8 use float */
+ int use_float = FALSE; /* for precision higher then 8 use float */
long signed_offsets[4] = {0, 0, 0, 0};
int float_divs[4] = {1, 1, 1, 1};
@@ -183,7 +183,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
i--;
if (image->comps[i].prec > 8)
- use_float = 1;
+ use_float = TRUE;
if (image->comps[i].sgnd)
signed_offsets[i] = 1 << (image->comps[i].prec - 1);
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index ef057784a28..27034317396 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -1085,7 +1085,7 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
float val_bf, nval_bf, diff_bf;
float val_gf, nval_gf, diff_gf;
float val_rf, nval_rf, diff_rf;
- int x, y, do_rect = 0, do_float = 0;
+ int x, y, do_rect = FALSE, do_float = FALSE;
val_a = nval_a = diff_a = val_b = nval_b = diff_b = 0;
val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0;
@@ -1095,12 +1095,12 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx)
if (ibuf->rect == NULL && ibuf->rect_float == NULL) return (ibuf);
if (ibuf->rect) {
- do_rect = 1;
+ do_rect = TRUE;
_newrect = MEM_mallocN(newx * ibuf->y * sizeof(int), "scaleupx");
if (_newrect == NULL) return(ibuf);
}
if (ibuf->rect_float) {
- do_float = 1;
+ do_float = TRUE;
_newrectf = MEM_mallocN(newx * ibuf->y * sizeof(float) * 4, "scaleupxf");
if (_newrectf == NULL) {
if (_newrect) MEM_freeN(_newrect);
@@ -1252,7 +1252,7 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
float val_bf, nval_bf, diff_bf;
float val_gf, nval_gf, diff_gf;
float val_rf, nval_rf, diff_rf;
- int x, y, do_rect = 0, do_float = 0, skipx;
+ int x, y, do_rect = FALSE, do_float = FALSE, skipx;
val_a = nval_a = diff_a = val_b = nval_b = diff_b = 0;
val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0;
@@ -1262,12 +1262,12 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy)
if (ibuf->rect == NULL && ibuf->rect_float == NULL) return (ibuf);
if (ibuf->rect) {
- do_rect = 1;
+ do_rect = TRUE;
_newrect = MEM_mallocN(ibuf->x * newy * sizeof(int), "scaleupy");
if (_newrect == NULL) return(ibuf);
}
if (ibuf->rect_float) {
- do_float = 1;
+ do_float = TRUE;
_newrectf = MEM_mallocN(ibuf->x * newy * sizeof(float) * 4, "scaleupyf");
if (_newrectf == NULL) {
if (_newrect) MEM_freeN(_newrect);
@@ -1481,16 +1481,16 @@ struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned
{
unsigned int *rect, *_newrect, *newrect;
struct imbufRGBA *rectf, *_newrectf, *newrectf;
- int x, y, do_float = 0, do_rect = 0;
+ int x, y, do_float = FALSE, do_rect = FALSE;
int ofsx, ofsy, stepx, stepy;
rect = NULL; _newrect = NULL; newrect = NULL;
rectf = NULL; _newrectf = NULL; newrectf = NULL;
if (ibuf == NULL) return(NULL);
- if (ibuf->rect) do_rect = 1;
- if (ibuf->rect_float) do_float = 1;
- if (do_rect == 0 && do_float == 0) return(ibuf);
+ if (ibuf->rect) do_rect = TRUE;
+ if (ibuf->rect_float) do_float = TRUE;
+ if (do_rect == FALSE && do_float == FALSE) return(ibuf);
if (newx == ibuf->x && newy == ibuf->y) return(ibuf);