diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-28 10:31:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-28 10:31:57 +0400 |
commit | b340f930ec5639f24e7e2d47fab221fb752b61dd (patch) | |
tree | 0e880a36bb528d133af6d10701fc090716b3b7f8 /source/blender/editors/curve | |
parent | 09dc600839904a198ab4ba3fad62ce58c2d3aa07 (diff) |
style cleanup: changes to brace placement / newlines - for/while/if/switch
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 2 | ||||
-rw-r--r-- | source/blender/editors/curve/editfont.c | 27 |
2 files changed, 19 insertions, 10 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index c19041b817e..0b21e514f0e 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6207,7 +6207,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob) nu->resolv= cu->resolv; } - switch(stype) { + switch (stype) { case CU_PRIM_CURVE: /* curve */ nu->resolu= cu->resolu; if (cutype==CU_BEZIER) { diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 1f1d1495276..29bebfab9e0 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -520,13 +520,17 @@ void ED_text_to_object(bContext *C, Text *text, int split_lines) } /********************** utilities ***************************/ - static short next_word(Curve *cu) { short s; - for (s=cu->pos; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') && - (cu->str[s]!=1) && (cu->str[s]!='\r'); s++); - if (cu->str[s]) return(s+1); else return(s); + for (s=cu->pos; ((cu->str[s]) && (cu->str[s] != ' ') && (cu->str[s] != '\n') && + (cu->str[s] != 1) && (cu->str[s] != '\r')); + s++) + { + /* pass */ + } + + return cu->str[s] ? (s + 1) : s; } static short prev_word(Curve *cu) @@ -534,9 +538,14 @@ static short prev_word(Curve *cu) short s; if (cu->pos==0) return(0); - for (s=cu->pos-2; (cu->str[s]) && (cu->str[s]!=' ') && (cu->str[s]!='\n') && - (cu->str[s]!=1) && (cu->str[s]!='\r'); s--); - if (cu->str[s]) return(s+1); else return(s); + for (s = cu->pos - 2; ((cu->str[s]) && (cu->str[s] != ' ') && (cu->str[s] != '\n') && + (cu->str[s] != 1) && (cu->str[s] != '\r')); + s--) + { + /* pass */ + } + + return cu->str[s] ? (s + 1) : s; } static int kill_selection(Object *obedit, int ins) /* 1 == new character */ @@ -816,7 +825,7 @@ static int move_cursor(bContext *C, int type, int select) EditFont *ef= cu->editfont; int cursmove= -1; - switch(type) { + switch (type) { case LINE_BEGIN: if ((select) && (cu->selstart==0)) cu->selstart = cu->selend = cu->pos+1; while (cu->pos>0) { @@ -1121,7 +1130,7 @@ static int delete_exec(bContext *C, wmOperator *op) else if (type == DEL_PREV_SEL) type= DEL_PREV_CHAR; } - switch(type) { + switch (type) { case DEL_ALL: cu->len = cu->pos = 0; ef->textbuf[0]= 0; |