mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
silence some crap warnings and fix the inversion of the branches in the usertype metatable because I'm a dumb
This commit is contained in:
parent
21f59a997a
commit
31b4dd820c
|
@ -112,7 +112,7 @@ struct __attribute__((packed, aligned(1))) flags_t {
|
|||
uint8_t Z : 1;
|
||||
uint8_t S : 1;
|
||||
uint16_t D : 14;
|
||||
} flags{};
|
||||
} flags{0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
int main() {
|
||||
std::cout << "=== usertype_bitfields example ===" << std::endl;
|
||||
|
|
|
@ -184,14 +184,14 @@ namespace sol {
|
|||
std::string accessor = stack::get<std::string>(L, 2);
|
||||
auto preexistingit = mapping.find(accessor);
|
||||
if (preexistingit == mapping.cend()) {
|
||||
runtime.emplace_back(L, 3);
|
||||
mapping.emplace_hint(mapping.cend(), accessor, call_information(&runtime_object_call, &runtime_object_call, target));
|
||||
}
|
||||
else {
|
||||
target = preexistingit->second.runtime_target;
|
||||
runtime[target] = sol::object(L, 3);
|
||||
preexistingit->second = call_information(&runtime_object_call, &runtime_object_call, target);
|
||||
}
|
||||
else {
|
||||
runtime.emplace_back(L, 3);
|
||||
mapping.emplace_hint(mapping.cend(), accessor, call_information(&runtime_object_call, &runtime_object_call, target));
|
||||
}
|
||||
}
|
||||
for (std::size_t i = 0; i < 4; lua_pop(L, 1), ++i) {
|
||||
const char* metakey = nullptr;
|
||||
|
|
Loading…
Reference in New Issue
Block a user