mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
I really don't like clang.
This commit is contained in:
parent
d52bc23f53
commit
c3bf2e04f8
|
@ -130,7 +130,7 @@ false;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline bool check_metatable(lua_State* L, int index = -2) {
|
inline bool check_metatable(lua_State* L, int index = -2) {
|
||||||
luaL_getmetatable(L, &usertype_traits<T>::metatable[0]);
|
luaL_getmetatable(L, &usertype_traits<T>::metatable[0]);
|
||||||
const type expectedmetatabletype = get<type>(L);
|
const type expectedmetatabletype = static_cast<type>(lua_type(L, -1));
|
||||||
if (expectedmetatabletype != type::nil) {
|
if (expectedmetatabletype != type::nil) {
|
||||||
if (lua_rawequal(L, -1, index) == 1) {
|
if (lua_rawequal(L, -1, index) == 1) {
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user