mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
CLuaInstance: Add overloaded member tableLookup() for bool vars
Origin commit data
------------------
Branch: ni/coolstream
Commit: fc0f5d780a
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-09-11 (Thu, 11 Sep 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -971,6 +971,18 @@ bool CLuaInstance::tableLookup(lua_State *L, const char *what, void** value)
|
||||
return res;
|
||||
}
|
||||
|
||||
bool CLuaInstance::tableLookup(lua_State *L, const char *what, bool &value)
|
||||
{
|
||||
bool res = false;
|
||||
lua_pushstring(L, what);
|
||||
lua_gettable(L, -2);
|
||||
res = lua_isboolean(L, -1);
|
||||
if (res)
|
||||
value = lua_toboolean(L, -1);
|
||||
lua_pop(L, 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
bool CLuaMenuChangeObserver::changeNotify(lua_State *L, const std::string &luaAction, const std::string &luaId, void *Data)
|
||||
{
|
||||
const char *optionValue = (const char *) Data;
|
||||
|
Reference in New Issue
Block a user