diff options
Diffstat (limited to 'src/uscxml/interpreter')
-rw-r--r-- | src/uscxml/interpreter/BasicDelayedEventQueue.cpp | 3 | ||||
-rw-r--r-- | src/uscxml/interpreter/BasicEventQueue.cpp | 2 | ||||
-rw-r--r-- | src/uscxml/interpreter/FastMicroStep.cpp | 12 |
3 files changed, 14 insertions, 3 deletions
diff --git a/src/uscxml/interpreter/BasicDelayedEventQueue.cpp b/src/uscxml/interpreter/BasicDelayedEventQueue.cpp index 74ab757..ef194ca 100644 --- a/src/uscxml/interpreter/BasicDelayedEventQueue.cpp +++ b/src/uscxml/interpreter/BasicDelayedEventQueue.cpp @@ -196,7 +196,8 @@ Data BasicDelayedEventQueue::serialize() { for (auto event : _queue) { struct callbackData cb = _callbackData[event.uuid]; - struct timeval delay, now; + struct timeval delay = {0, 0}; + struct timeval now = {0, 0}; uint64_t delayMs = 0; evutil_gettimeofday(&now, NULL); diff --git a/src/uscxml/interpreter/BasicEventQueue.cpp b/src/uscxml/interpreter/BasicEventQueue.cpp index bb7c78b..5b3e9f8 100644 --- a/src/uscxml/interpreter/BasicEventQueue.cpp +++ b/src/uscxml/interpreter/BasicEventQueue.cpp @@ -42,7 +42,7 @@ Event BasicEventQueue::dequeue(size_t blockMs) { system_clock::time_point endTime = now + milliseconds(blockMs); // now + milliseconds(blockMs) may not have fitted into a duration type - limit to maximum duration - if (blockMs > system_clock::duration::max().count() - duration_cast<milliseconds>(now.time_since_epoch()).count()) { + if (blockMs > (size_t)(system_clock::duration::max().count() - duration_cast<milliseconds>(now.time_since_epoch()).count())) { endTime = system_clock::time_point::max(); } diff --git a/src/uscxml/interpreter/FastMicroStep.cpp b/src/uscxml/interpreter/FastMicroStep.cpp index 3edd3e4..33ffebd 100644 --- a/src/uscxml/interpreter/FastMicroStep.cpp +++ b/src/uscxml/interpreter/FastMicroStep.cpp @@ -420,7 +420,17 @@ COMPLETION_STABLISHED: /** -- All things transitions -- */ - tmp = DOMUtils::inPostFixOrder({_xmlPrefix.str() + "transition"}, _scxml); +// tmp = DOMUtils::inPostFixOrder({_xmlPrefix.str() + "transition"}, _scxml); + tmp = DOMUtils::inPostFixOrder({ + XML_PREFIX(_scxml).str() + "scxml", + XML_PREFIX(_scxml).str() + "state", + XML_PREFIX(_scxml).str() + "final", + XML_PREFIX(_scxml).str() + "history", + XML_PREFIX(_scxml).str() + "initial", + XML_PREFIX(_scxml).str() + "parallel" + }, _scxml); + tmp = DOMUtils::filterChildElements(XML_PREFIX(_scxml).str() + "transition", tmp); + _transitions.resize(tmp.size()); for (i = 0; i < _transitions.size(); i++) { |