Skip to content
Snippets Groups Projects
Unverified Commit 1cd40f10 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #1806 from ReinUsesLisp/morton-fixup

morton: Fixup compiler warning
parents 11c17465 237c2026
No related branches found
No related tags found
No related merge requests found
...@@ -183,13 +183,14 @@ static constexpr ConversionArray linear_to_morton_fns = { ...@@ -183,13 +183,14 @@ static constexpr ConversionArray linear_to_morton_fns = {
// clang-format on // clang-format on
}; };
constexpr MortonCopyFn GetSwizzleFunction(MortonSwizzleMode mode, Surface::PixelFormat format) { static MortonCopyFn GetSwizzleFunction(MortonSwizzleMode mode, Surface::PixelFormat format) {
switch (mode) { switch (mode) {
case MortonSwizzleMode::MortonToLinear: case MortonSwizzleMode::MortonToLinear:
return morton_to_linear_fns[static_cast<std::size_t>(format)]; return morton_to_linear_fns[static_cast<std::size_t>(format)];
case MortonSwizzleMode::LinearToMorton: case MortonSwizzleMode::LinearToMorton:
return linear_to_morton_fns[static_cast<std::size_t>(format)]; return linear_to_morton_fns[static_cast<std::size_t>(format)];
} }
UNREACHABLE();
} }
/// 8x8 Z-Order coordinate from 2D coordinates /// 8x8 Z-Order coordinate from 2D coordinates
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment