mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
Remove ceil2/floor2 from types.h
This commit is contained in:
parent
dff4392c10
commit
666a18f5e5
2 changed files with 2 additions and 34 deletions
|
|
@ -6,7 +6,6 @@
|
|||
#include <climits>
|
||||
#include "gcm_enums.h"
|
||||
#include "rsx_utils.h"
|
||||
#pragma warning(disable:4503)
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
|
|
@ -43,8 +42,8 @@ struct registers_decoder
|
|||
{};
|
||||
|
||||
// Use the smallest type by default
|
||||
template <u32 I, u32 N, typename T = get_uint_t<std::max<size_t>(static_cast<size_t>((UINTMAX_C(1) << ::ceil2(N)) / CHAR_BIT), 1)>>
|
||||
static constexpr inline T bf_decoder(const u32& bits)
|
||||
template <u32 I, u32 N, typename T = get_uint_t<(N <= 8 ? 1 : (N <= 16 ? 2 : 4))>>
|
||||
constexpr T bf_decoder(u32 bits)
|
||||
{
|
||||
return static_cast<T>(bf_t<u32, I, N>::extract(bits));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue