MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / align_user

Function align_user

Libs/sol/sol.hpp:9951–9965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9949
9950 template <typename T>
9951 void* align_user(void* ptr) {
9952 typedef std::integral_constant<bool,
9953#if SOL_IS_OFF(SOL_ALIGN_MEMORY_I_)
9954 false
9955#else
9956 (std::alignment_of_v<T> > 1)
9957#endif
9958 >
9959 use_align;
9960 if (!use_align::value) {
9961 return ptr;
9962 }
9963 std::size_t space = (std::numeric_limits<std::size_t>::max)();
9964 return align(std::alignment_of_v<T>, sizeof(T), ptr, space);
9965 }
9966
9967 template <typename T>
9968 T** usertype_allocate_pointer(lua_State* L) {

Callers

nothing calls this directly

Calls 1

alignFunction · 0.85

Tested by

no test coverage detected