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>2013-03-20 03:17:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-20 03:17:44 +0400
commite7c15beaf68217b2dad2143c17ba88024e3de49f (patch)
treebd391a09f5d629be2f0ac7ae3163895adf58fa8e /source/blender/editors/space_console
parentcb11af8b0651ba0106b5f66f3be061cb8f24154c (diff)
code cleanup: use booleans for mesh and selection code.
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/console_intern.h4
-rw-r--r--source/blender/editors/space_console/console_ops.c14
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_console/console_intern.h b/source/blender/editors/space_console/console_intern.h
index 1e79e4b9714..00f1f8c21c9 100644
--- a/source/blender/editors/space_console/console_intern.h
+++ b/source/blender/editors/space_console/console_intern.h
@@ -45,8 +45,8 @@ void console_scrollback_prompt_end(struct SpaceConsole *sc, ConsoleLine *cl_dumm
/* console_ops.c */
void console_history_free(SpaceConsole *sc, ConsoleLine *cl);
void console_scrollback_free(SpaceConsole *sc, ConsoleLine *cl);
-ConsoleLine *console_history_add_str(struct SpaceConsole *sc, char *str, int own);
-ConsoleLine *console_scrollback_add_str(struct SpaceConsole *sc, char *str, int own);
+ConsoleLine *console_history_add_str(struct SpaceConsole *sc, char *str, bool own);
+ConsoleLine *console_scrollback_add_str(struct SpaceConsole *sc, char *str, bool own);
ConsoleLine *console_history_verify(const struct bContext *C);
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index b735dee5bdf..74f776549e9 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -116,7 +116,7 @@ static ConsoleLine *console_history_find(SpaceConsole *sc, const char *str, Cons
}
/* return 0 if no change made, clamps the range */
-static int console_line_cursor_set(ConsoleLine *cl, int cursor)
+static bool console_line_cursor_set(ConsoleLine *cl, int cursor)
{
int cursor_new;
@@ -125,11 +125,11 @@ static int console_line_cursor_set(ConsoleLine *cl, int cursor)
else cursor_new = cursor;
if (cursor_new == cl->cursor) {
- return FALSE;
+ return false;
}
cl->cursor = cursor_new;
- return TRUE;
+ return true;
}
#if 0 // XXX unused
@@ -188,7 +188,7 @@ static ConsoleLine *console_scrollback_add(const bContext *C, ConsoleLine *from)
}
#endif
-static ConsoleLine *console_lb_add_str__internal(ListBase *lb, char *str, int own)
+static ConsoleLine *console_lb_add_str__internal(ListBase *lb, char *str, bool own)
{
ConsoleLine *ci = MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add");
if (own) ci->line = str;
@@ -199,11 +199,11 @@ static ConsoleLine *console_lb_add_str__internal(ListBase *lb, char *str, int ow
BLI_addtail(lb, ci);
return ci;
}
-ConsoleLine *console_history_add_str(SpaceConsole *sc, char *str, int own)
+ConsoleLine *console_history_add_str(SpaceConsole *sc, char *str, bool own)
{
return console_lb_add_str__internal(&sc->history, str, own);
}
-ConsoleLine *console_scrollback_add_str(SpaceConsole *sc, char *str, int own)
+ConsoleLine *console_scrollback_add_str(SpaceConsole *sc, char *str, bool own)
{
ConsoleLine *ci = console_lb_add_str__internal(&sc->scrollback, str, own);
console_select_offset(sc, ci->len + 1);
@@ -276,7 +276,7 @@ static int console_move_exec(bContext *C, wmOperator *op)
ConsoleLine *ci = console_history_verify(C);
int type = RNA_enum_get(op->ptr, "type");
- int done = FALSE;
+ bool done = false;
int pos;
switch (type) {