diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-12-01 19:11:18 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-12-01 19:11:55 +0300 |
commit | 20a177814815e7e3a1a4a4d37e91880ef98aa68a (patch) | |
tree | a3a12264e2bb1935f6fc07645de46699707358fb /source/blender/blenkernel/intern/anim_sys.c | |
parent | 9c782c17ba03b3ed61bec1f1e9c73bc5f6522ded (diff) |
Cleanup: more int->bool.
Diffstat (limited to 'source/blender/blenkernel/intern/anim_sys.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 5bf458805bd..8e36449f214 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -83,7 +83,7 @@ bool id_type_can_have_animdata(ID *id) { /* sanity check */ if (id == NULL) - return 0; + return false; /* Only some ID-blocks have this info for now */ /* TODO: finish adding this for the other blocktypes */ @@ -102,12 +102,12 @@ bool id_type_can_have_animdata(ID *id) case ID_MSK: case ID_GD: { - return 1; + return true; } /* no AnimData */ default: - return 0; + return false; } } @@ -194,20 +194,20 @@ bool BKE_animdata_set_action(ReportList *reports, ID *id, bAction *act) /* can set */ adt->action = act; id_us_plus((ID *)adt->action); - ok = 1; + ok = true; } else { /* cannot set */ BKE_reportf(reports, RPT_ERROR, "Could not set action '%s' onto ID '%s', as it does not have suitably rooted paths " "for this purpose", act->id.name + 2, id->name); - /* ok = 0; */ + /* ok = false; */ } } else { /* just clearing the action... */ adt->action = NULL; - ok = 1; + ok = true; } return ok; @@ -290,7 +290,7 @@ bool BKE_copy_animdata_id(ID *id_to, ID *id_from, const bool do_action) AnimData *adt; if ((id_to && id_from) && (GS(id_to->name) != GS(id_from->name))) - return 0; + return false; BKE_free_animdata(id_to); @@ -300,7 +300,7 @@ bool BKE_copy_animdata_id(ID *id_to, ID *id_from, const bool do_action) iat->adt = BKE_copy_animdata(adt, do_action); } - return 1; + return true; } void BKE_copy_animdata_id_action(ID *id) @@ -1353,7 +1353,7 @@ static bool animsys_remap_path(AnimMapper *UNUSED(remap), char *path, char **dst /* nothing suitable found, so just set dst to look at path (i.e. no alloc/free needed) */ *dst = path; - return 0; + return false; } @@ -1382,7 +1382,7 @@ static bool animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_ind path, array_index, array_len - 1); } - return 0; + return false; } switch (RNA_property_type(prop)) { @@ -1436,7 +1436,7 @@ static bool animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_ind break; default: /* nothing can be done here... so it is unsuccessful? */ - return 0; + return false; } /* RNA property update disabled for now - [#28525] [#28690] [#28774] [#28777] */ @@ -1475,7 +1475,7 @@ static bool animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_ind } /* successful */ - return 1; + return true; } else { /* failed to get path */ @@ -1486,7 +1486,7 @@ static bool animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_ind (ptr->id.data) ? (((ID *)ptr->id.data)->name + 2) : "<No ID>", path, array_index); } - return 0; + return false; } } |