Skip to content

Commit 162e2dd

Browse files
rtakacsakosthekiss
authored andcommitted
Use logical operators for bool converions. (#2707)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
1 parent 0b3d5ed commit 162e2dd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jerry-core/ecma/operations/ecma-objects.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,11 +1347,11 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
13471347

13481348
const ecma_object_type_t type = ecma_get_object_type (obj_p);
13491349
const bool obj_is_builtin = ecma_get_object_is_builtin (obj_p);
1350-
const bool is_enumerable_only = (const bool) (opts & ECMA_LIST_ENUMERABLE);
1351-
const bool is_array_indices_only = (const bool) (opts & ECMA_LIST_ARRAY_INDICES);
1352-
const bool is_with_prototype_chain = (const bool) (opts & ECMA_LIST_PROTOTYPE);
1350+
const bool is_enumerable_only = (opts & ECMA_LIST_ENUMERABLE) != 0;
1351+
const bool is_array_indices_only = (opts & ECMA_LIST_ARRAY_INDICES) != 0;
1352+
const bool is_with_prototype_chain = (opts & ECMA_LIST_PROTOTYPE) != 0;
13531353
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
1354-
const bool is_symbols_only = (const bool) (opts & ECMA_LIST_SYMBOLS);
1354+
const bool is_symbols_only = (opts & ECMA_LIST_SYMBOLS) != 0;
13551355
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
13561356

13571357
const size_t bitmap_row_size = sizeof (uint32_t) * JERRY_BITSINBYTE;

0 commit comments

Comments
 (0)