diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-04-13 10:32:35 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-04-13 10:32:35 (GMT) |
commit | 199d27c0f613e54369865ad73ffcb523ee8930fd (patch) | |
tree | 8d97068bcfa87c6b3223d53312941bf707e8cfef | |
parent | cb7851856cb0bb2f90ed6e1b9cd85fcf9cf3315f (diff) | |
download | uscxml-199d27c0f613e54369865ad73ffcb523ee8930fd.zip uscxml-199d27c0f613e54369865ad73ffcb523ee8930fd.tar.gz uscxml-199d27c0f613e54369865ad73ffcb523ee8930fd.tar.bz2 |
Fixed build errors on Windows and Debian
-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) { |