diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-22 10:46:02 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-22 10:46:02 (GMT) |
commit | d6fa07c2b4b3eb0c8db4f79927f88de72892dcc2 (patch) | |
tree | 8fffadcf042cb1a90468ee218956d67383c85e84 /src/uscxml/plugins/datamodel/lua | |
parent | b3c7a989ebf1ac9342d17a1130e99663d7471cdf (diff) | |
download | uscxml-d6fa07c2b4b3eb0c8db4f79927f88de72892dcc2.zip uscxml-d6fa07c2b4b3eb0c8db4f79927f88de72892dcc2.tar.gz uscxml-d6fa07c2b4b3eb0c8db4f79927f88de72892dcc2.tar.bz2 |
Corrected for a MSVC compiler bug and more tests in validate()
Diffstat (limited to 'src/uscxml/plugins/datamodel/lua')
-rw-r--r-- | src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index 02b97c3..6fa56df 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -22,8 +22,11 @@ #include "uscxml/Common.h" #include "LuaDataModel.h" +// disable forcing to bool performance warning +#pragma warning(push) +#pragma warning(disable : 4800) #include "LuaBridge.h" -//#include "RefCountedPtr.h" +#pragma warning(pop) #include "uscxml/DOMUtils.h" @@ -136,7 +139,6 @@ static int luaInFunction(lua_State * l) { return 1; } - boost::shared_ptr<DataModelImpl> LuaDataModel::create(InterpreterImpl* interpreter) { boost::shared_ptr<LuaDataModel> dm = boost::shared_ptr<LuaDataModel>(new LuaDataModel()); dm->_interpreter = interpreter; @@ -147,7 +149,9 @@ boost::shared_ptr<DataModelImpl> LuaDataModel::create(InterpreterImpl* interpret const luabridge::LuaRef& requireFunc = luabridge::getGlobal(dm->_luaState, "require"); const luabridge::LuaRef& resultLxp = requireFunc("lxp"); const luabridge::LuaRef& resultLxpLOM = requireFunc("lxp.lom"); - if (resultLxp && resultLxpLOM) { + + // MSVC compiler bug with implicit cast operators, see comments in LuaRef class + if ((bool)resultLxp && (bool)resultLxpLOM) { _luaHasXMLParser = true; luabridge::setGlobal(dm->_luaState, resultLxp, "lxp"); luabridge::setGlobal(dm->_luaState, resultLxpLOM, "lxp.lom"); |