fix(util/lua.cpp): 'implicit conversion of nullptr constant to bool' warning
clang-3.6.0 generated the following warning: /Users/soonhok/work/lean/src/util/lua.cpp:49:12: warning: implicit conversion of nullptr constant to 'bool' [-Wnull-conversion] return nullptr; ~~~~~~ ^~~~~~~ false
This commit is contained in:
parent
8243ed6339
commit
3ac29fae43
1 changed files with 2 additions and 2 deletions
|
@ -43,10 +43,10 @@ bool testudata(lua_State * L, int ud, char const * tname) {
|
|||
if (!lua_rawequal(L, -1, -2))
|
||||
p = nullptr;
|
||||
lua_pop(L, 2);
|
||||
return p;
|
||||
return p != nullptr;
|
||||
}
|
||||
}
|
||||
return nullptr; // value is not a userdata with a metatable
|
||||
return false; // value is not a userdata with a metatable
|
||||
}
|
||||
|
||||
int load(lua_State * L, lua_Reader reader, void * data, char const * source) {
|
||||
|
|
Loading…
Reference in a new issue