macro-proof the library

This commit is contained in:
ThePhD 2017-11-17 07:20:17 -05:00
parent fa912a57f6
commit 4a39020df9
2 changed files with 12 additions and 12 deletions

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2017-11-17 12:07:21.024261 UTC // Generated 2017-11-17 12:20:03.514818 UTC
// This header was generated with sol v2.18.6 (revision 6738cee) // This header was generated with sol v2.18.6 (revision fa912a5)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP #ifndef SOL_SINGLE_INCLUDE_HPP
@ -6573,7 +6573,7 @@ namespace sol {
inline std::size_t aligned_space_for(void* alignment = nullptr) { inline std::size_t aligned_space_for(void* alignment = nullptr) {
char* start = static_cast<char*>(alignment); char* start = static_cast<char*>(alignment);
auto specific_align = [&alignment](std::size_t a, std::size_t s) { auto specific_align = [&alignment](std::size_t a, std::size_t s) {
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
alignment = align(a, s, alignment, space); alignment = align(a, s, alignment, space);
alignment = static_cast<void*>(static_cast<char*>(alignment) + s); alignment = static_cast<void*>(static_cast<char*>(alignment) + s);
}; };
@ -6593,7 +6593,7 @@ namespace sol {
if (!use_align::value) { if (!use_align::value) {
return ptr; return ptr;
} }
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
return align(std::alignment_of<void*>::value, sizeof(void*), ptr, space); return align(std::alignment_of<void*>::value, sizeof(void*), ptr, space);
} }
@ -6611,7 +6611,7 @@ namespace sol {
} }
ptr = align_usertype_pointer(ptr); ptr = align_usertype_pointer(ptr);
ptr = static_cast<void*>(static_cast<char*>(ptr) + sizeof(void*)); ptr = static_cast<void*>(static_cast<char*>(ptr) + sizeof(void*));
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
return align(std::alignment_of<unique_destructor>::value, sizeof(unique_destructor), ptr, space); return align(std::alignment_of<unique_destructor>::value, sizeof(unique_destructor), ptr, space);
} }
@ -6632,7 +6632,7 @@ namespace sol {
if (!use_align::value) { if (!use_align::value) {
return ptr; return ptr;
} }
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
return align(std::alignment_of<T>::value, sizeof(T), ptr, space); return align(std::alignment_of<T>::value, sizeof(T), ptr, space);
} }
@ -6649,7 +6649,7 @@ namespace sol {
if (!use_align::value) { if (!use_align::value) {
return ptr; return ptr;
} }
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
return align(std::alignment_of<T>::value, sizeof(T), ptr, space); return align(std::alignment_of<T>::value, sizeof(T), ptr, space);
} }

View File

@ -76,7 +76,7 @@ namespace sol {
inline std::size_t aligned_space_for(void* alignment = nullptr) { inline std::size_t aligned_space_for(void* alignment = nullptr) {
char* start = static_cast<char*>(alignment); char* start = static_cast<char*>(alignment);
auto specific_align = [&alignment](std::size_t a, std::size_t s) { auto specific_align = [&alignment](std::size_t a, std::size_t s) {
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
alignment = align(a, s, alignment, space); alignment = align(a, s, alignment, space);
alignment = static_cast<void*>(static_cast<char*>(alignment) + s); alignment = static_cast<void*>(static_cast<char*>(alignment) + s);
}; };
@ -96,7 +96,7 @@ namespace sol {
if (!use_align::value) { if (!use_align::value) {
return ptr; return ptr;
} }
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
return align(std::alignment_of<void*>::value, sizeof(void*), ptr, space); return align(std::alignment_of<void*>::value, sizeof(void*), ptr, space);
} }
@ -114,7 +114,7 @@ namespace sol {
} }
ptr = align_usertype_pointer(ptr); ptr = align_usertype_pointer(ptr);
ptr = static_cast<void*>(static_cast<char*>(ptr) + sizeof(void*)); ptr = static_cast<void*>(static_cast<char*>(ptr) + sizeof(void*));
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
return align(std::alignment_of<unique_destructor>::value, sizeof(unique_destructor), ptr, space); return align(std::alignment_of<unique_destructor>::value, sizeof(unique_destructor), ptr, space);
} }
@ -135,7 +135,7 @@ namespace sol {
if (!use_align::value) { if (!use_align::value) {
return ptr; return ptr;
} }
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
return align(std::alignment_of<T>::value, sizeof(T), ptr, space); return align(std::alignment_of<T>::value, sizeof(T), ptr, space);
} }
@ -152,7 +152,7 @@ namespace sol {
if (!use_align::value) { if (!use_align::value) {
return ptr; return ptr;
} }
std::size_t space = std::numeric_limits<std::size_t>::max(); std::size_t space = (std::numeric_limits<std::size_t>::max)();
return align(std::alignment_of<T>::value, sizeof(T), ptr, space); return align(std::alignment_of<T>::value, sizeof(T), ptr, space);
} }