Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.
This commit is contained in:
parent
f0f5319b0b
commit
e34f1f504c
33 changed files with 71 additions and 67 deletions
|
|
@ -387,7 +387,7 @@ void (*type_init_function_table[])(Variant *) = {
|
|||
&&OPCODE_LINE, \
|
||||
&&OPCODE_END \
|
||||
}; \
|
||||
static_assert((sizeof(switch_table_ops) / sizeof(switch_table_ops[0]) == (OPCODE_END + 1)), "Opcodes in jump table aren't the same as opcodes in enum.");
|
||||
static_assert(std::size(switch_table_ops) == (OPCODE_END + 1), "Opcodes in jump table aren't the same as opcodes in enum.");
|
||||
|
||||
#define OPCODE(m_op) \
|
||||
m_op:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue