From e45b1e94619e2d7f193f9efea6005f3b4d8b4982 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 18 May 2010 19:24:01 +0200 Subject: [PATCH] Changed: #900 ELuaExecuteError: No matching overload found, setContextHelpText --- .../ryzom/client/src/interface_v3/lua_ihm.cpp | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/lua_ihm.cpp b/code/ryzom/client/src/interface_v3/lua_ihm.cpp index c95deab32..982201346 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm.cpp @@ -649,20 +649,22 @@ void CLuaIHM::luaValueFromReflectedProperty(CLuaState &ls, CReflectable &reflect break; case CReflectedProperty::UCString: { + ucstring str = (reflectedObject.*(property.GetMethod.GetUCString))(); #if LUABIND_VERSION > 600 - luabind::detail::push(ls.getStatePointer(), (reflectedObject.*(property.GetMethod.GetUCString))() ); + luabind::detail::push(ls.getStatePointer(), str); #else - luabind::object obj(ls.getStatePointer(), (reflectedObject.*(property.GetMethod.GetUCString))() ); + luabind::object obj(ls.getStatePointer(), str); obj.pushvalue(); #endif } break; case CReflectedProperty::RGBA: { + CRGBA color = (reflectedObject.*(property.GetMethod.GetRGBA))(); #if LUABIND_VERSION > 600 - luabind::detail::push(ls.getStatePointer(), (reflectedObject.*(property.GetMethod.GetRGBA))() ); + luabind::detail::push(ls.getStatePointer(), color); #else - luabind::object obj(ls.getStatePointer(), (reflectedObject.*(property.GetMethod.GetRGBA))()); + luabind::object obj(ls.getStatePointer(), color); obj.pushvalue(); #endif } @@ -1137,17 +1139,17 @@ int CLuaIHM::getClientCfgVar(CLuaState &ls) ls.newTable(); CLuaObject result(ls); uint count = 0; - for(uint i = 0; (sint)iStrValues.size(); i++) + for(uint i = 0; iStrValues.size(); i++) { result.setValue(toString(count).c_str(), v->StrValues[i]); count++; } - for(uint i = 0; (sint)iIntValues.size(); i++) + for(uint i = 0; iIntValues.size(); i++) { result.setValue(toString(count).c_str(), (double)v->IntValues[i]); count++; } - for(uint i = 0; (sint)iRealValues.size(); i++) + for(uint i = 0; iRealValues.size(); i++) { result.setValue(toString(count).c_str(), (double)v->RealValues[i]); count++; @@ -2000,7 +2002,7 @@ void CLuaIHM::unpauseBGDownloader() // *************************************************************************** void CLuaIHM::requestBGDownloaderPriority(uint priority) { - if (priority < 0 || priority >= BGDownloader::ThreadPriority_Count) + if (priority >= BGDownloader::ThreadPriority_Count) { throw NLMISC::Exception("requestBGDownloaderPriority() : invalid priority"); } @@ -2689,10 +2691,11 @@ int CLuaIHM::runExprAndPushResult(CLuaState &ls, const std::string &expr) } case CInterfaceExprValue::RGBA: { + CRGBA color = value.getRGBA(); #if LUABIND_VERSION > 600 - luabind::detail::push(ls.getStatePointer(), value.getRGBA()); + luabind::detail::push(ls.getStatePointer(), color); #else - luabind::object obj(ls.getStatePointer(), value.getRGBA()); + luabind::object obj(ls.getStatePointer(), color); obj.pushvalue(); #endif break;