*polished code.

This commit is contained in:
Wang Renxin 2016-07-19 17:01:14 +08:00 committed by GitHub
parent cd46b18856
commit 15ad976c54

View File

@ -14901,9 +14901,7 @@ static int _std_floor(mb_interpreter_t* s, void** l) {
mb_check(mb_attempt_close_bracket(s, l)); mb_check(mb_attempt_close_bracket(s, l));
switch(arg.type) { switch(arg.type) {
case MB_DT_INT: case MB_DT_INT: /* Do nothing */
/* Do nothing */
break; break;
case MB_DT_REAL: case MB_DT_REAL:
arg.value.integer = (int_t)floor(arg.value.float_point); arg.value.integer = (int_t)floor(arg.value.float_point);
@ -14937,9 +14935,7 @@ static int _std_ceil(mb_interpreter_t* s, void** l) {
mb_check(mb_attempt_close_bracket(s, l)); mb_check(mb_attempt_close_bracket(s, l));
switch(arg.type) { switch(arg.type) {
case MB_DT_INT: case MB_DT_INT: /* Do nothing */
/* Do nothing */
break; break;
case MB_DT_REAL: case MB_DT_REAL:
arg.value.integer = (int_t)ceil(arg.value.float_point); arg.value.integer = (int_t)ceil(arg.value.float_point);
@ -14973,9 +14969,7 @@ static int _std_fix(mb_interpreter_t* s, void** l) {
mb_check(mb_attempt_close_bracket(s, l)); mb_check(mb_attempt_close_bracket(s, l));
switch(arg.type) { switch(arg.type) {
case MB_DT_INT: case MB_DT_INT: /* Do nothing */
/* Do nothing */
break; break;
case MB_DT_REAL: case MB_DT_REAL:
arg.value.integer = (int_t)(arg.value.float_point); arg.value.integer = (int_t)(arg.value.float_point);
@ -15009,9 +15003,7 @@ static int _std_round(mb_interpreter_t* s, void** l) {
mb_check(mb_attempt_close_bracket(s, l)); mb_check(mb_attempt_close_bracket(s, l));
switch(arg.type) { switch(arg.type) {
case MB_DT_INT: case MB_DT_INT: /* Do nothing */
/* Do nothing */
break; break;
case MB_DT_REAL: case MB_DT_REAL:
arg.value.integer = (int_t)(arg.value.float_point + (real_t)0.5f); arg.value.integer = (int_t)(arg.value.float_point + (real_t)0.5f);