#include "Math/TMathInline.h"
#include <limits>
Go to the source code of this file.
◆ TAlignNumDown()
Definition at line 59 of file Helpers.h.
60{
62 return a_iValue & (T)( ~( a_uiAlignment - 1U ) );
63}
#define TSTATICASSERT(...)
◆ TAlignNumUp()
Definition at line 66 of file Helpers.h.
67{
69 return ( a_iValue + ( a_uiAlignment - 1U ) ) & (T)( ~( a_uiAlignment - 1U ) );
70}
◆ TAlignPointerDown()
template<class T>
TFORCEINLINE constexpr T * TAlignPointerDown |
( |
T * | a_pMem, |
|
|
TSIZE | a_uiAlignment = sizeof( T* ) ) |
|
constexpr |
Definition at line 50 of file Helpers.h.
51{
53 T*,
54 (
TUINTPTR( a_pMem ) ) & ( ~( a_uiAlignment - 1U ) )
55 );
56}
#define TREINTERPRETCAST(TYPE, VALUE)
◆ TAlignPointerUp()
template<class T>
TFORCEINLINE constexpr T * TAlignPointerUp |
( |
T * | a_pMem, |
|
|
TSIZE | a_uiAlignment = sizeof( T* ) ) |
|
constexpr |
Definition at line 41 of file Helpers.h.
42{
44 T*,
45 (
TUINTPTR( a_pMem ) + ( a_uiAlignment - 1 ) ) & ( ~( a_uiAlignment - 1U ) )
46 );
47}
◆ TFourCC()
Definition at line 15 of file Helpers.h.
16{
17 return ( ( str[ 3 ] << 24 ) | ( str[ 2 ] << 16 ) | ( str[ 1 ] << 8 ) | str[ 0 ] );
18}
◆ TFourCCBE()
Definition at line 27 of file Helpers.h.
28{
29 return PARSEDWORD_BIG(
TFourCC( str ) );
30}
TFORCEINLINE constexpr TUINT32 TFourCC(const TCHAR str[4])
◆ TFourCCLE()
◆ TIsPointerAligned()
Definition at line 35 of file Helpers.h.
36{
37 return 0 == (
TUINTPTR( a_pPointer ) % a_uiAlignment );
38}
◆ TSwapValues()
Definition at line 7 of file Helpers.h.
8{
9 T temp = std::move( a );
10 a = std::move( b );
11 b = std::move( temp );
12}