I really don't like clang.

This commit is contained in:
ThePhD 2016-03-15 06:45:49 -04:00
parent d52bc23f53
commit c3bf2e04f8

View File

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