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:
ThePhD 2017-03-16 03:36:15 -04:00
parent 21f59a997a
commit 31b4dd820c
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;