diff options
author | Stefan Radomski <sradomski@mintwerk.de> | 2016-02-24 10:50:32 (GMT) |
---|---|---|
committer | Stefan Radomski <sradomski@mintwerk.de> | 2016-02-24 10:50:32 (GMT) |
commit | cf19f11b8d2bd6d9566c7528fbed40af06928abf (patch) | |
tree | a373b8e934fa78a1bf9db8afca2e9854437e45da /src/uscxml/debug/Complexity.cpp | |
parent | 7212d5a3dbbd2845d09df96b2c345132c8a24931 (diff) | |
download | uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.zip uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.tar.gz uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.tar.bz2 |
Some more refactoring and VHDL transformation
Diffstat (limited to 'src/uscxml/debug/Complexity.cpp')
-rw-r--r-- | src/uscxml/debug/Complexity.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/uscxml/debug/Complexity.cpp b/src/uscxml/debug/Complexity.cpp index a7f9f93..232260c 100644 --- a/src/uscxml/debug/Complexity.cpp +++ b/src/uscxml/debug/Complexity.cpp @@ -35,7 +35,7 @@ std::list<std::set<Element<std::string> > > Complexity::getAllConfigurations(con bool isAtomic = true; NodeList<std::string> children = root.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { + for (size_t i = 0; i < children.getLength(); i++) { if (children.item(i).getNodeType() != Node_base::ELEMENT_NODE) continue; Element<std::string> childElem(children.item(i)); @@ -148,7 +148,7 @@ Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Eleme bool hasNestedData = false; Arabica::DOM::NodeList<std::string> childElems = root.getChildNodes(); - for (int i = 0; i < childElems.getLength(); i++) { + for (size_t i = 0; i < childElems.getLength(); i++) { if (childElems.item(i).getNodeType() != Node_base::ELEMENT_NODE) continue; Element<std::string> childElem = Element<std::string>(childElems.item(i)); @@ -161,7 +161,7 @@ Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Eleme } if (!hasNestedData && childElem.getLocalName() == "datamodel") { Arabica::DOM::NodeList<std::string> dataElemChilds = childElem.getChildNodes(); - for (int j = 0; j < dataElemChilds.getLength(); j++) { + for (size_t j = 0; j < dataElemChilds.getLength(); j++) { if (dataElemChilds.item(j).getLocalName() == "data") hasNestedData = true; } @@ -176,7 +176,7 @@ Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Eleme } else if (InterpreterImpl::isCompound(root) || TAGNAME(root) == "scxml") { // compounds can be in any of the child state -> add NodeSet<std::string> childs = InterpreterImpl::getChildStates(root); - for (int i = 0; i < childs.size(); i++) { + for (size_t i = 0; i < childs.size(); i++) { complexity += calculateStateMachineComplexity(Element<std::string>(childs[i]), reachable); } if (hasFlatHistory) { @@ -189,7 +189,7 @@ Complexity Complexity::calculateStateMachineComplexity(const Arabica::DOM::Eleme // parallels are in all states -> multiply NodeSet<std::string> childs = InterpreterImpl::getChildStates(root); complexity.value = 1; - for (int i = 0; i < childs.size(); i++) { + for (size_t i = 0; i < childs.size(); i++) { complexity *= calculateStateMachineComplexity(Element<std::string>(childs[i]), reachable); } if (hasDeepHistory) { |