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

Function align_user

extlibs/sol3/include/sol/sol.hpp:9389–9403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9387
9388 template <typename T>
9389 void* align_user(void* ptr) {
9390 typedef std::integral_constant<bool,
9391#if defined(SOL_NO_MEMORY_ALIGNMENT) && SOL_NO_MEMORY_ALIGNMENT
9392 false
9393#else
9394 (std::alignment_of<T>::value > 1)
9395#endif
9396 >
9397 use_align;
9398 if (!use_align::value) {
9399 return ptr;
9400 }
9401 std::size_t space = (std::numeric_limits<std::size_t>::max)();
9402 return align(std::alignment_of<T>::value, sizeof(T), ptr, space);
9403 }
9404
9405 template <typename T>
9406 T** usertype_allocate_pointer(lua_State* L) {

Callers

nothing calls this directly

Calls 1

alignFunction · 0.85

Tested by

no test coverage detected