LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007 University of Washington | 3 * Copyright (c) 2007 University of Washington |
4 * Copyright (c) 2013 ResiliNets, ITTC, University of Kansas· | 4 * Copyright (c) 2013 ResiliNets, ITTC, University of Kansas· |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 // converted to a dynamically-sized array of uint32_t to avoid· | 455 // converted to a dynamically-sized array of uint32_t to avoid· |
456 // list iteration below. | 456 // list iteration below. |
457 bool· | 457 bool· |
458 ListErrorModel::DoCorrupt (Ptr<Packet> p)· | 458 ListErrorModel::DoCorrupt (Ptr<Packet> p)· |
459 {· | 459 {· |
460 NS_LOG_FUNCTION (this << p); | 460 NS_LOG_FUNCTION (this << p); |
461 if (!IsEnabled ()) | 461 if (!IsEnabled ()) |
462 { | 462 { |
463 return false; | 463 return false; |
464 } | 464 } |
465 uint32_t uid = (uint32_t)p->GetUid (); | 465 uint32_t uid = static_cast<uint32_t>(p->GetUid ()); |
466 for (PacketListCI i = m_packetList.begin ();· | 466 for (PacketListCI i = m_packetList.begin ();· |
467 i != m_packetList.end (); i++) | 467 i != m_packetList.end (); i++) |
468 { | 468 { |
469 if (uid == *i) | 469 if (uid == *i) |
470 { | 470 { |
471 return true; | 471 return true; |
472 } | 472 } |
473 } | 473 } |
474 return false; | 474 return false; |
475 } | 475 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 { | 591 { |
592 NS_LOG_FUNCTION (this); | 592 NS_LOG_FUNCTION (this); |
593 m_counter = 0; | 593 m_counter = 0; |
594 } | 594 } |
595 | 595 |
596 | 596 |
597 | 597 |
598 | 598 |
599 } // namespace ns3 | 599 } // namespace ns3 |
600 | 600 |
LEFT | RIGHT |