27 template <
int InlineSize>
31 template <
typename BufferType,
typename... Types>
35 static_assert(
FormatArgsCount < 256,
"Maximum number of arguments is 256");
48 template <
int BufferSize,
typename... Types>
51 static_assert(BufferSize < 65536,
"Maximum buffer size of 16 bits exceeded");
74 struct TIsStringArgument
80 constexpr static uint64 GetArgumentEncodedSize(T Argument)
82 if constexpr (TIsStringArgument<T>::Value)
84 if (Argument !=
nullptr)
90 return sizeof(CharType);
99 constexpr static uint64 GetArgumentsEncodedSize()
104 template <
typename T,
typename... Types>
105 static uint64 GetArgumentsEncodedSize(T Head, Types... Tail)
107 return GetArgumentEncodedSize(Head) + GetArgumentsEncodedSize(Tail...);
110 template <
typename T>
113 if constexpr (TIsStringArgument<T>::Value)
115 using CharType = std::remove_cv_t<typename TRemovePointer<T>::Type>;
118 if (Argument !=
nullptr)
121 memcpy(PayloadPtr, Argument, SizeBytes);
124 const CharType
Ellipsis[4] = {L
'.', L
'.', L
'.', L
'\0'};
126 void*
PatchPoint = PayloadPtr + SizeBytes -
sizeof(
Ellipsis) - (SizeBytes %
sizeof(CharType));
129 PayloadPtr += SizeBytes;
135 PayloadPtr +=
sizeof(CharType);
140 if constexpr (std::is_floating_point_v<T>)
149#if PLATFORM_SUPPORTS_UNALIGNED_LOADS
150 *
reinterpret_cast<T*
>(PayloadPtr) = Argument;
155 memcpy(PayloadPtr, &Argument,
sizeof Argument);
158 PayloadPtr +=
sizeof(T);
166 template <
typename T,
typename... Types>
#define check(expr)
Definition AssertionMacros.h:314
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
memcpy(InputBufferBase, BinkBlocksData, BinkBlocksSize)
static int32 Strlen(const CharType *String)
Definition CString.h:1047
Definition IsCharType.h:10