diff options
author | László Langó <llango.u-szeged@partner.samsung.com> | 2018-06-06 08:08:17 +0200 |
---|---|---|
committer | yichoi <duddlf.choi@samsung.com> | 2018-06-06 15:08:17 +0900 |
commit | b4b0b7d57252a2af6f9f7f7793990d28fb179554 (patch) | |
tree | f6d38a1d29f7fc83621d3bfd839df793b6adb309 /jerry-core/ecma/builtin-objects/ecma-builtin-global.c | |
parent | b61d0ed856fd792c426c1eeee6e2f8da1f257d29 (diff) |
Merged conditions of if statements where possible. (#2380)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
Diffstat (limited to 'jerry-core/ecma/builtin-objects/ecma-builtin-global.c')
-rw-r--r-- | jerry-core/ecma/builtin-objects/ecma-builtin-global.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-global.c b/jerry-core/ecma/builtin-objects/ecma-builtin-global.c index 181740b7..d256c6e4 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-global.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-global.c @@ -190,17 +190,16 @@ ecma_builtin_global_object_parse_int (ecma_value_t this_arg, /**< this argument if (ecma_is_value_empty (ret_value)) { /* 10. */ - if (strip_prefix) + if (strip_prefix + && ((end_p - start_p) >= 2) + && (current == LIT_CHAR_0)) { - if (end_p - start_p >= 2 && current == LIT_CHAR_0) + ecma_char_t next = *string_curr_p; + if (next == LIT_CHAR_LOWERCASE_X || next == LIT_CHAR_UPPERCASE_X) { - ecma_char_t next = *string_curr_p; - if (next == LIT_CHAR_LOWERCASE_X || next == LIT_CHAR_UPPERCASE_X) - { - /* Skip the 'x' or 'X' characters. */ - start_p = ++string_curr_p; - rad = 16; - } + /* Skip the 'x' or 'X' characters. */ + start_p = ++string_curr_p; + rad = 16; } } |