mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
HiresTextures: Remove unnecessary pointer casts in GenBaseName()
swap16 has an overload that accepts a u8*, performing the same behavior in a well-defined manner.
This commit is contained in:
parent
9feb18866b
commit
d5a1edba09
@ -243,10 +243,11 @@ std::string HiresTexture::GenBaseName(const u8* texture, size_t texture_size, co
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 16384 * 2:
|
case 16384 * 2:
|
||||||
for (size_t i = 0; i < texture_size / 2; i++)
|
for (size_t i = 0; i < texture_size; i += sizeof(u16))
|
||||||
{
|
{
|
||||||
min = std::min<u32>(min, Common::swap16(((u16*)texture)[i]) & 0x3fff);
|
const u16 texture_halfword = Common::swap16(texture[i]) & 0x3fff;
|
||||||
max = std::max<u32>(max, Common::swap16(((u16*)texture)[i]) & 0x3fff);
|
min = std::min<u32>(min, texture_halfword);
|
||||||
|
max = std::max<u32>(max, texture_halfword);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user