diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-03 11:55:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-03 12:35:44 +0400 |
commit | d900f5be55d0812eb5c7dfd3ea47020c3edafd41 (patch) | |
tree | 7d5035e3dbafdcd4988e7ed57068e48c951a989a /source/blender/imbuf | |
parent | a948ae2c5167c49819241572d3aacb4e4bf5b6d7 (diff) |
Code cleanup: use bools where possible
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 2 | ||||
-rw-r--r-- | source/blender/imbuf/IMB_moviecache.h | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/moviecache.c | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/scaling.c | 5 | ||||
-rw-r--r-- | source/blender/imbuf/intern/util.c | 2 |
5 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index c70ab5d7189..be0069f5bfa 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -360,7 +360,7 @@ int IMB_ispic(const char *name); * * \attention Defined in util.c */ -int IMB_isanim(const char *name); +bool IMB_isanim(const char *name); /** * diff --git a/source/blender/imbuf/IMB_moviecache.h b/source/blender/imbuf/IMB_moviecache.h index 3432741596f..0c72d1b4f01 100644 --- a/source/blender/imbuf/IMB_moviecache.h +++ b/source/blender/imbuf/IMB_moviecache.h @@ -58,9 +58,9 @@ void IMB_moviecache_set_priority_callback(struct MovieCache *cache, MovieCacheGe MovieCachePriorityDeleterFP prioritydeleterfp); void IMB_moviecache_put(struct MovieCache *cache, void *userkey, struct ImBuf *ibuf); -int IMB_moviecache_put_if_possible(struct MovieCache *cache, void *userkey, struct ImBuf *ibuf); +bool IMB_moviecache_put_if_possible(struct MovieCache *cache, void *userkey, struct ImBuf *ibuf); struct ImBuf *IMB_moviecache_get(struct MovieCache *cache, void *userkey); -int IMB_moviecache_has_frame(struct MovieCache *cache, void *userkey); +bool IMB_moviecache_has_frame(struct MovieCache *cache, void *userkey); void IMB_moviecache_free(struct MovieCache *cache); void IMB_moviecache_cleanup(struct MovieCache *cache, diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c index 00d9dd2fe04..07ce3c39d73 100644 --- a/source/blender/imbuf/intern/moviecache.c +++ b/source/blender/imbuf/intern/moviecache.c @@ -384,10 +384,10 @@ void IMB_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf) do_moviecache_put(cache, userkey, ibuf, TRUE); } -int IMB_moviecache_put_if_possible(MovieCache *cache, void *userkey, ImBuf *ibuf) +bool IMB_moviecache_put_if_possible(MovieCache *cache, void *userkey, ImBuf *ibuf) { size_t mem_in_use, mem_limit, elem_size; - int result = FALSE; + bool result = false; elem_size = IMB_get_size_in_memory(ibuf); mem_limit = MEM_CacheLimiter_get_maximum(); @@ -429,7 +429,7 @@ ImBuf *IMB_moviecache_get(MovieCache *cache, void *userkey) return NULL; } -int IMB_moviecache_has_frame(MovieCache *cache, void *userkey) +bool IMB_moviecache_has_frame(MovieCache *cache, void *userkey) { MovieCacheKey key; MovieCacheItem *item; diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index 2ae05315c85..3c24864c671 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -58,7 +58,7 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1) short a, r, g, b; int x, y; float af, rf, gf, bf, *p1f, *_p1f, *destf; - int do_rect, do_float; + bool do_rect, do_float; if (ibuf1 == NULL) return (NULL); if (ibuf1->rect == NULL && ibuf1->rect_float == NULL) return (NULL); @@ -1130,7 +1130,8 @@ 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 = FALSE, do_float = FALSE; + int x, y; + bool 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; diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index d929304d185..a8d7949b8cd 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -450,7 +450,7 @@ int imb_get_anim_type(const char *name) return ANIM_NONE; } -int IMB_isanim(const char *filename) +bool IMB_isanim(const char *filename) { int type; |