OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2006 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2006 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
250 } | 250 } |
251 *argc = j; | 251 *argc = j; |
252 } | 252 } |
253 | 253 |
254 // parsed all flags successfully | 254 // parsed all flags successfully |
255 return 0; | 255 return 0; |
256 } | 256 } |
257 | 257 |
258 void FlagList::Register(Flag* flag) { | 258 void FlagList::Register(Flag* flag) { |
259 assert(flag != NULL && strlen(flag->name()) > 0); | 259 assert(flag != NULL && strlen(flag->name()) > 0); |
260 RTC_CHECK(!Lookup(flag->name())) << "flag " << flag->name() | |
261 << " declared twice"; | |
pthatcher1
2016/06/30 20:49:39
Then can we at least leave a comment here, perhaps
| |
262 flag->next_ = list_; | 260 flag->next_ = list_; |
263 list_ = flag; | 261 list_ = flag; |
264 } | 262 } |
265 | 263 |
266 #if defined(WEBRTC_WIN) | 264 #if defined(WEBRTC_WIN) |
267 WindowsCommandLineArguments::WindowsCommandLineArguments() { | 265 WindowsCommandLineArguments::WindowsCommandLineArguments() { |
268 // start by getting the command line. | 266 // start by getting the command line. |
269 LPTSTR command_line = ::GetCommandLine(); | 267 LPTSTR command_line = ::GetCommandLine(); |
270 // now, convert it to a list of wide char strings. | 268 // now, convert it to a list of wide char strings. |
271 LPWSTR *wide_argv = ::CommandLineToArgvW(command_line, &argc_); | 269 LPWSTR *wide_argv = ::CommandLineToArgvW(command_line, &argc_); |
(...skipping 16 matching lines...) Expand all Loading... | |
288 // need to free each string in the array, and then the array. | 286 // need to free each string in the array, and then the array. |
289 for(int i = 0; i < argc_; i++) { | 287 for(int i = 0; i < argc_; i++) { |
290 delete[] argv_[i]; | 288 delete[] argv_[i]; |
291 } | 289 } |
292 | 290 |
293 delete[] argv_; | 291 delete[] argv_; |
294 } | 292 } |
295 #endif // WEBRTC_WIN | 293 #endif // WEBRTC_WIN |
296 | 294 |
297 } // namespace rtc | 295 } // namespace rtc |
OLD | NEW |