c++17: use std::size

This commit is contained in:
scribam 2018-09-05 22:52:31 +02:00 committed by Ivan
parent 7724161c14
commit d7bb59cd99
11 changed files with 21 additions and 21 deletions

View file

@ -365,7 +365,7 @@ spu_imm_table_t::scale_table_t::scale_table_t()
spu_imm_table_t::spu_imm_table_t()
{
for (u32 i = 0; i < sizeof(sldq_pshufb) / sizeof(sldq_pshufb[0]); i++)
for (u32 i = 0; i < std::size(sldq_pshufb); i++)
{
for (u32 j = 0; j < 16; j++)
{
@ -373,7 +373,7 @@ spu_imm_table_t::spu_imm_table_t()
}
}
for (u32 i = 0; i < sizeof(srdq_pshufb) / sizeof(srdq_pshufb[0]); i++)
for (u32 i = 0; i < std::size(srdq_pshufb); i++)
{
const u32 im = (0u - i) & 0x1f;
@ -383,7 +383,7 @@ spu_imm_table_t::spu_imm_table_t()
}
}
for (u32 i = 0; i < sizeof(rldq_pshufb) / sizeof(rldq_pshufb[0]); i++)
for (u32 i = 0; i < std::size(rldq_pshufb); i++)
{
for (u32 j = 0; j < 16; j++)
{