diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-21 12:16:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-21 12:16:37 +0400 |
commit | 7db1d6556d2aefcf4e5e787477b7cd22104e15ac (patch) | |
tree | b1cf518de6a88886e9566aae62dec168d2a96f20 /source/blender/editors/util | |
parent | 3ec1daaa77f20e1aeaae30b5beab675659e873f2 (diff) |
code cleanup: add break statements in switch ()'s, (even at the last case).
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/numinput.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index bfe3b80eff4..3e5f879aa3c 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -109,6 +109,7 @@ void outputNumInput(NumInput *n, char *str) break; default: BLI_snprintf(&str[j * ln], ln, "%s%.4e%c", inv, n->val[i], cur); + break; } } } @@ -201,8 +202,7 @@ char handleNumInput(NumInput *n, const wmEvent *event) n->inv[idx] = 0; } break; - case PERIODKEY: - case PADPERIOD: + case PERIODKEY: case PADPERIOD: if (n->flag & NUM_NO_FRACTION) return 0; @@ -213,11 +213,13 @@ char handleNumInput(NumInput *n, const wmEvent *event) break; case -1: n->ctrl[idx] = -10; + break; } break; case PADMINUS: if (event->alt) break; + /* fall-through */ case MINUSKEY: if (n->flag & NUM_NO_NEGATIVE) return 0; @@ -229,8 +231,7 @@ char handleNumInput(NumInput *n, const wmEvent *event) else n->ctrl[idx] = -1; break; - case PADSLASHKEY: - case SLASHKEY: + case PADSLASHKEY: case SLASHKEY: if (n->flag & NUM_NO_FRACTION) return 0; @@ -245,35 +246,34 @@ char handleNumInput(NumInput *n, const wmEvent *event) idx = 0; n->idx = idx; break; - case PAD9: - case NINEKEY: + case PAD9: case NINEKEY: Val += 1.0f; - case PAD8: - case EIGHTKEY: + /* fall-through */ + case PAD8: case EIGHTKEY: Val += 1.0f; - case PAD7: - case SEVENKEY: + /* fall-through */ + case PAD7: case SEVENKEY: Val += 1.0f; - case PAD6: - case SIXKEY: + /* fall-through */ + case PAD6: case SIXKEY: Val += 1.0f; - case PAD5: - case FIVEKEY: + /* fall-through */ + case PAD5: case FIVEKEY: Val += 1.0f; - case PAD4: - case FOURKEY: + /* fall-through */ + case PAD4: case FOURKEY: Val += 1.0f; - case PAD3: - case THREEKEY: + /* fall-through */ + case PAD3: case THREEKEY: Val += 1.0f; - case PAD2: - case TWOKEY: + /* fall-through */ + case PAD2: case TWOKEY: Val += 1.0f; - case PAD1: - case ONEKEY: + /* fall-through */ + case PAD1: case ONEKEY: Val += 1.0f; - case PAD0: - case ZEROKEY: + /* fall-through */ + case PAD0: case ZEROKEY: if (!n->ctrl[idx]) n->ctrl[idx] = 1; |