Skip to content
Permalink
Browse files

VideoCommon/VertexLoader_Normal: Use variable template variants of ty…

…pe traits

Same thing, less reading.
  • Loading branch information...
lioncash committed May 30, 2019
1 parent 8268b6f commit 0084aeb5d7ee25562f0303d23707433d41c6e65a
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/Core/VideoCommon/VertexLoader_Normal.cpp
@@ -30,7 +30,7 @@ constexpr float FracAdjust(T val)
// auto const U16FRAC = 1.f / (1u << 15);

// TODO: is this right?
return val / float(1u << (sizeof(T) * 8 - std::is_signed<T>::value - 1));
return val / float(1u << (sizeof(T) * 8 - std::is_signed_v<T> - 1));
}

template <>
@@ -70,7 +70,7 @@ struct Normal_Direct
template <typename I, typename T, u32 N, u32 Offset>
void Normal_Index_Offset()
{
static_assert(std::is_unsigned<I>::value, "Only unsigned I is sane!");
static_assert(std::is_unsigned_v<I>, "Only unsigned I is sane!");

auto const index = DataRead<I>();
auto const data = reinterpret_cast<const T*>(

0 comments on commit 0084aeb

Please sign in to comment.
You can’t perform that action at this time.