OLD | NEW |
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) 2008 INRIA | 3 * Copyright (c) 2008 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 SimpleChannel::Add (Ptr<SimpleNetDevice> device) | 81 SimpleChannel::Add (Ptr<SimpleNetDevice> device) |
82 { | 82 { |
83 NS_LOG_FUNCTION (this << device); | 83 NS_LOG_FUNCTION (this << device); |
84 m_devices.push_back (device); | 84 m_devices.push_back (device); |
85 } | 85 } |
86 | 86 |
87 uint32_t | 87 uint32_t |
88 SimpleChannel::GetNDevices (void) const | 88 SimpleChannel::GetNDevices (void) const |
89 { | 89 { |
90 NS_LOG_FUNCTION (this); | 90 NS_LOG_FUNCTION (this); |
91 return m_devices.size (); | 91 return static_cast<uint32_t> (m_devices.size ()); |
92 } | 92 } |
93 | 93 |
94 Ptr<NetDevice> | 94 Ptr<NetDevice> |
95 SimpleChannel::GetDevice (uint32_t i) const | 95 SimpleChannel::GetDevice (uint32_t i) const |
96 { | 96 { |
97 NS_LOG_FUNCTION (this << i); | 97 NS_LOG_FUNCTION (this << i); |
98 return m_devices[i]; | 98 return m_devices[i]; |
99 } | 99 } |
100 | 100 |
101 void | 101 void |
(...skipping 22 matching lines...) Expand all Loading... |
124 iter = find (m_blackListedDevices[to].begin (), m_blackListedDevices[to].e
nd (), from); | 124 iter = find (m_blackListedDevices[to].begin (), m_blackListedDevices[to].e
nd (), from); |
125 if (iter != m_blackListedDevices[to].end () ) | 125 if (iter != m_blackListedDevices[to].end () ) |
126 { | 126 { |
127 m_blackListedDevices[to].erase (iter); | 127 m_blackListedDevices[to].erase (iter); |
128 } | 128 } |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 | 132 |
133 } // namespace ns3 | 133 } // namespace ns3 |
OLD | NEW |