summaryrefslogtreecommitdiffstats
path: root/test/src/test-c-machine.cpp
diff options
context:
space:
mode:
authorStefan Radomski <sradomski@mintwerk.de>2016-02-24 10:50:32 (GMT)
committerStefan Radomski <sradomski@mintwerk.de>2016-02-24 10:50:32 (GMT)
commitcf19f11b8d2bd6d9566c7528fbed40af06928abf (patch)
treea373b8e934fa78a1bf9db8afca2e9854437e45da /test/src/test-c-machine.cpp
parent7212d5a3dbbd2845d09df96b2c345132c8a24931 (diff)
downloaduscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.zip
uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.tar.gz
uscxml-cf19f11b8d2bd6d9566c7528fbed40af06928abf.tar.bz2
Some more refactoring and VHDL transformation
Diffstat (limited to 'test/src/test-c-machine.cpp')
-rw-r--r--test/src/test-c-machine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/src/test-c-machine.cpp b/test/src/test-c-machine.cpp
index 815993e..f78e970 100644
--- a/test/src/test-c-machine.cpp
+++ b/test/src/test-c-machine.cpp
@@ -242,7 +242,7 @@ public:
}
bool isInState(const std::string& stateId) {
- for (int i = 0 ; i < ctx.machine->nr_states; i++) {
+ for (size_t i = 0 ; i < ctx.machine->nr_states; i++) {
if (ctx.machine->states[i].name != NULL && BIT_HAS(i, ctx.config) && stateId == ctx.machine->states[i].name)
return true;
}
@@ -797,7 +797,7 @@ public:
std::string seperator;
size_t start = 0;
- for (int i = 0; i < text.size(); i++) {
+ for (size_t i = 0; i < text.size(); i++) {
if (isspace(text[i])) {
if (i > 0 && start < i) {
content << seperator << text.substr(start, i - start);
@@ -823,7 +823,7 @@ public:
size_t start = 0;
std::string eventDesc;
- for (int i = 0; i < eventDescs.size(); i++) {
+ for (size_t i = 0; i < eventDescs.size(); i++) {
if (isspace(eventDescs[i])) {
if (i > 0 && start < i - 1) {
eventDesc = eventDescs.substr(start, i - start);
@@ -960,7 +960,7 @@ int main(int argc, char** argv) {
rootMachine.dataModel.timer.elapsed = 0;
#endif
size_t passIdx = 0;
- for (int i = 0; i < rootMachine.ctx.machine->nr_states; i++) {
+ for (size_t i = 0; i < rootMachine.ctx.machine->nr_states; i++) {
if (rootMachine.ctx.machine->states[i].name && strcmp(rootMachine.ctx.machine->states[i].name, "pass") == 0) {
passIdx = i;
break;