summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp')
-rw-r--r--src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp10
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");