texure_cache/util: Resolve implicit sign conversions with std::reduce

Amends implicit sign conversions occurring with usages of std::reduce
and also relocates it to its own utility function to reduce verbosity a
little bit.
This commit is contained in:
Lioncash
2021-04-12 05:17:18 -04:00
parent 26d60014d0
commit fddb278aa3
2 changed files with 15 additions and 11 deletions

View File

@ -20,6 +20,8 @@ namespace VideoCommon {
using Tegra::Texture::TICEntry;
using LevelArray = std::array<u32, MAX_MIP_LEVELS>;
struct OverlapResult {
GPUVAddr gpu_addr;
VAddr cpu_addr;
@ -36,8 +38,7 @@ struct OverlapResult {
[[nodiscard]] u32 CalculateLayerSize(const ImageInfo& info) noexcept;
[[nodiscard]] std::array<u32, MAX_MIP_LEVELS> CalculateMipLevelOffsets(
const ImageInfo& info) noexcept;
[[nodiscard]] LevelArray CalculateMipLevelOffsets(const ImageInfo& info) noexcept;
[[nodiscard]] std::vector<u32> CalculateSliceOffsets(const ImageInfo& info);