From af3e348430218e609c80d86c8dd418bed15e70e8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 19 May 2012 13:28:19 +0000 Subject: code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. --- source/blender/editors/util/editmode_undo.c | 8 ++++---- source/blender/editors/util/undo.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/util') diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index ac0f8306259..9aaccb57fe2 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -209,19 +209,19 @@ static void undo_clean_stack(bContext *C) uel = undobase.first; while (uel) { void *editdata = uel->getdata(C); - int isvalid = 0; + int is_valid = FALSE; next = uel->next; /* for when objects are converted, renamed, or global undo changes pointers... */ if (uel->type == obedit->type) { if (strcmp(uel->id.name, obedit->id.name) == 0) { if (uel->validate_undo == NULL) - isvalid = 1; + is_valid = TRUE; else if (uel->validate_undo(uel->undodata, editdata)) - isvalid = 1; + is_valid = TRUE; } } - if (isvalid) + if (is_valid) uel->ob = obedit; else { if (uel == curundo) diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index cd88614f8fe..e7a9ab9ca73 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -165,15 +165,15 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) } } else { - int do_glob_undo = 0; + int do_glob_undo = FALSE; if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) { if (!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname)) - do_glob_undo = 1; + do_glob_undo = TRUE; } else if (obact && obact->mode & OB_MODE_SCULPT) { if (!ED_undo_paint_step(C, UNDO_PAINT_MESH, step, undoname)) - do_glob_undo = 1; + do_glob_undo = TRUE; } else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) { if (step == 1) @@ -182,7 +182,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) PE_redo(CTX_data_scene(C)); } else { - do_glob_undo = 1; + do_glob_undo = TRUE; } if (do_glob_undo) { -- cgit v1.2.3