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 INRIA | 3 * Copyright (c) 2007 INRIA |
4 * Copyright (c) 2011 The Boeing Company | 4 * Copyright (c) 2011 The Boeing Company |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 std::string::size_type col = 0; | 182 std::string::size_type col = 0; |
183 for (uint8_t i = 0; i < 2; ++i) | 183 for (uint8_t i = 0; i < 2; ++i) |
184 { | 184 { |
185 std::string tmp; | 185 std::string tmp; |
186 std::string::size_type next; | 186 std::string::size_type next; |
187 next = v.find (":", col); | 187 next = v.find (":", col); |
188 if (next == std::string::npos) | 188 if (next == std::string::npos) |
189 { | 189 { |
190 tmp = v.substr (col, v.size ()-col); | 190 tmp = v.substr (col, v.size ()-col); |
191 address.m_address[i] = static_cast<uint8_t>(strtoul (tmp.c_str(), 0, 1
6)); | 191 address.m_address[i] = static_cast<uint8_t> (strtoul (tmp.c_str(), 0,
16)); |
192 break; | 192 break; |
193 } | 193 } |
194 else | 194 else |
195 { | 195 { |
196 tmp = v.substr (col, next-col); | 196 tmp = v.substr (col, next-col); |
197 address.m_address[i] = static_cast<uint8_t>(strtoul (tmp.c_str(), 0, 1
6)); | 197 address.m_address[i] = static_cast<uint8_t> (strtoul (tmp.c_str(), 0,
16)); |
198 col = next + 1; | 198 col = next + 1; |
199 } | 199 } |
200 } | 200 } |
201 return is; | 201 return is; |
202 } | 202 } |
203 | 203 |
204 } | 204 } |
LEFT | RIGHT |