Unify else clause style

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-04-03 16:56:27 +09:00
parent fbf4089d2f
commit 77331d127b
17 changed files with 86 additions and 43 deletions
+10 -5
View File
@@ -387,7 +387,8 @@ mrb_str_succ_bang(mrb_state *mrb, mrb_value self)
if (e < b) {
e = p + l - 1;
result = mrb_str_new_lit(mrb, "");
} else {
}
else {
// find leading letter of the ascii/number
b = e;
while (b > p) {
@@ -405,7 +406,8 @@ mrb_str_succ_bang(mrb_state *mrb, mrb_value self)
if (*e == 0xff) {
mrb_str_cat_lit(mrb, result, "\x01");
(*e) = 0;
} else
}
else
(*e)++;
break;
}
@@ -413,13 +415,16 @@ mrb_str_succ_bang(mrb_state *mrb, mrb_value self)
if (*e == '9') {
if (e == b) prepend = "1";
*e = '0';
} else if (*e == 'z') {
}
else if (*e == 'z') {
if (e == b) prepend = "a";
*e = 'a';
} else if (*e == 'Z') {
}
else if (*e == 'Z') {
if (e == b) prepend = "A";
*e = 'A';
} else {
}
else {
(*e)++;
break;
}