diff options
-rw-r--r-- | src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | 14 | ||||
-rw-r--r-- | test/src/test-gen-c.cpp | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index d4c27da..647738a 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -96,19 +96,19 @@ static Data getLuaAsData(lua_State* _luaState, const luabridge::LuaRef& lua) { data.atom = lua.cast<std::string>(); data.type = Data::VERBATIM; } else if(lua.isTable()) { - bool isArray = false; - bool isMap = false; +// bool isArray = false; +// bool isMap = false; for (luabridge::Iterator iter (lua); !iter.isNil(); ++iter) { luabridge::LuaRef luaKey = iter.key(); luabridge::LuaRef luaVal = *iter; if (luaKey.isString()) { - assert(!isArray); - isMap = true; +// assert(!isArray); +// isMap = true; // luaKey.tostring() is not working?! see issue84 data.compound[luaKey.cast<std::string>()] = getLuaAsData(_luaState, luaVal); } else { - assert(!isMap); - isArray = true; +// assert(!isMap); +// isArray = true; data.array.push_back(getLuaAsData(_luaState, luaVal)); } } @@ -193,7 +193,7 @@ int LuaDataModel::luaInFunction(lua_State * l) { LuaDataModel* dm = ref.cast<LuaDataModel*>(); int stackSize = lua_gettop(l); - for (size_t i = 0; i < stackSize; i++) { + for (int i = 0; i < stackSize; i++) { if (!lua_isstring(l, -1 - i)) continue; std::string stateName = lua_tostring(l, -1 - i); diff --git a/test/src/test-gen-c.cpp b/test/src/test-gen-c.cpp index fa80fd5..e184c10 100644 --- a/test/src/test-gen-c.cpp +++ b/test/src/test-gen-c.cpp @@ -9,7 +9,7 @@ #include <iostream> #define USCXML_VERBOSE -#define WITH_DM_ECMA_JSC +//#define WITH_DM_ECMA_JSC #include "uscxml/config.h" @@ -1017,7 +1017,7 @@ protected: int main(int argc, char** argv) { - int err; + int err = 0; size_t benchmarkRuns = 1; const char* envBenchmarkRuns = getenv("USCXML_BENCHMARK_ITERATIONS"); if (envBenchmarkRuns != NULL) { |