diff options
author | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-02-17 20:06:38 +0000 |
---|---|---|
committer | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-02-17 20:06:38 +0000 |
commit | 657f095a5848e94f0f7422f26b69d689d0ab30cd (patch) | |
tree | 9f43ce7b3c0b6f1c12c0c741d05e5ffa043b7270 /examples | |
parent | a0147fcf09af35a6944aa0805e398ddefa4a3e5e (diff) | |
download | ATCD-657f095a5848e94f0f7422f26b69d689d0ab30cd.tar.gz |
ChangeLogTag: Thu Feb 17 14:15:42 2005 Boris Kolpackov <boris@kolpackov.net>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/RMCast/Send_Msg/Receiver.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/examples/RMCast/Send_Msg/Receiver.cpp b/examples/RMCast/Send_Msg/Receiver.cpp index 0082ac2b9d6..1fb9c7d91a1 100644 --- a/examples/RMCast/Send_Msg/Receiver.cpp +++ b/examples/RMCast/Send_Msg/Receiver.cpp @@ -10,7 +10,6 @@ #include <vector> #include <iostream> - using std::cout; using std::cerr; using std::endl; @@ -36,9 +35,13 @@ main (int argc, char* argv[]) Message expected_msg; expected_msg.sn = 0; - for (unsigned short i = 0; i < payload_size; i++) + // VC6 does not know about new rules. + // { - expected_msg.payload[i] = i; + for (unsigned short i = 0; i < payload_size; i++) + { + expected_msg.payload[i] = i; + } } Status_List received (message_count, 0); @@ -70,17 +73,26 @@ main (int argc, char* argv[]) unsigned long lost_count (0), damaged_count (0), duplicate_count (0); - for (Status_List::iterator i (received.begin ()), end (received.end ()); - i != end; - ++i) if (*i == 0) ++lost_count; + { + for (Status_List::iterator i (received.begin ()), end (received.end ()); + i != end; + ++i) if (*i == 0) ++lost_count; + } + - for (Status_List::iterator i (damaged.begin ()), end (damaged.end ()); - i != end; - ++i) if (*i == 1) ++damaged_count; + { + for (Status_List::iterator i (damaged.begin ()), end (damaged.end ()); + i != end; + ++i) if (*i == 1) ++damaged_count; + } + + + { + for (Status_List::iterator i (duplicate.begin ()), end (duplicate.end ()); + i != end; + ++i) if (*i == 1) ++duplicate_count; + } - for (Status_List::iterator i (duplicate.begin ()), end (duplicate.end ()); - i != end; - ++i) if (*i == 1) ++duplicate_count; cout << "lost : " << lost_count << endl << "damaged : " << damaged_count << endl |