mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
@@ -12,8 +12,8 @@ namespace bx
|
||||
// Reference(S):
|
||||
// - https://web.archive.org/web/20181115035420/http://cnicholson.net/2011/01/stupid-c-tricks-a-better-sizeof_array/
|
||||
//
|
||||
template<typename Ty, size_t Num>
|
||||
char(&CountOfRequireArrayArgumentT(const Ty(&)[Num]))[Num];
|
||||
template<typename Ty, size_t NumT>
|
||||
char (&CountOfRequireArrayArgumentT(const Ty (&)[NumT]) )[NumT];
|
||||
|
||||
template<bool B>
|
||||
struct isEnabled
|
||||
@@ -33,6 +33,12 @@ namespace bx
|
||||
return __is_trivially_copyable(Ty);
|
||||
}
|
||||
|
||||
template<typename Ty>
|
||||
constexpr bool isSigned()
|
||||
{
|
||||
return Ty(-1) < Ty(0);
|
||||
}
|
||||
|
||||
template<typename Ty>
|
||||
inline Ty* addressOf(Ty& _a)
|
||||
{
|
||||
@@ -71,12 +77,6 @@ namespace bx
|
||||
Ty tmp = _a; _a = _b; _b = tmp;
|
||||
}
|
||||
|
||||
template<typename Ty>
|
||||
constexpr bool isSigned()
|
||||
{
|
||||
return Ty(-1) < Ty(0);
|
||||
}
|
||||
|
||||
template<typename Ty>
|
||||
struct LimitsT<Ty, true>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user