diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-15 21:54:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-15 23:44:25 +0300 |
commit | 266e7b67fd3e2c219d8646e37a2fb3e393df4bda (patch) | |
tree | 5d28c4aafc81502e447c733d9c4f2c82b78172d4 /source/blender/blenkernel | |
parent | 0f79c346c63f21f246ab636d74eea9b7aa874a33 (diff) |
Cleanup: use boolean
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 53976b4c1ad..755a155653b 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -137,8 +137,8 @@ void CTX_store_free(bContextStore *store); void CTX_store_free_list(ListBase *contexts); /* need to store if python is initialized or not */ -int CTX_py_init_get(bContext *C); -void CTX_py_init_set(bContext *C, int value); +bool CTX_py_init_get(bContext *C); +void CTX_py_init_set(bContext *C, bool value); void *CTX_py_dict_get(const bContext *C); void CTX_py_dict_set(bContext *C, void *value); diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 2cb98d8d90b..f536f21c3e5 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -89,7 +89,8 @@ struct bContext { struct Scene *scene; int recursion; - int py_init; /* true if python is initialized */ + /** True if python is initialized. */ + bool py_init; void *py_context; } data; }; @@ -212,11 +213,11 @@ void CTX_store_free_list(ListBase *contexts) /* is python initialized? */ -int CTX_py_init_get(bContext *C) +bool CTX_py_init_get(bContext *C) { return C->data.py_init; } -void CTX_py_init_set(bContext *C, int value) +void CTX_py_init_set(bContext *C, bool value) { C->data.py_init = value; } diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 8e04ef2d3ca..a99407b9bf9 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2766,8 +2766,8 @@ static void do_makepicstring(char *string, int frame, const char imtype, const ImageFormatData *im_format, - const short use_ext, - const short use_frames, + const bool use_ext, + const bool use_frames, const char *suffix) { if (string == NULL) { |