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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 } | 251 } |
252 *argc = j; | 252 *argc = j; |
253 } | 253 } |
254 | 254 |
255 // parsed all flags successfully | 255 // parsed all flags successfully |
256 return 0; | 256 return 0; |
257 } | 257 } |
258 | 258 |
259 void FlagList::Register(Flag* flag) { | 259 void FlagList::Register(Flag* flag) { |
260 RTC_DCHECK(flag); | 260 RTC_DCHECK(flag); |
261 RTC_DCHECK_GT(strlen(flag->name()), 0u); | 261 RTC_DCHECK_GT(strlen(flag->name()), 0); |
262 // NOTE: Don't call Lookup() within Register because it accesses the name_ | 262 // NOTE: Don't call Lookup() within Register because it accesses the name_ |
263 // of other flags in list_, and if the flags are coming from two different | 263 // of other flags in list_, and if the flags are coming from two different |
264 // compilation units, the initialization order between them is undefined, and | 264 // compilation units, the initialization order between them is undefined, and |
265 // this will trigger an asan initialization-order-fiasco error. | 265 // this will trigger an asan initialization-order-fiasco error. |
266 flag->next_ = list_; | 266 flag->next_ = list_; |
267 list_ = flag; | 267 list_ = flag; |
268 } | 268 } |
269 | 269 |
270 #if defined(WEBRTC_WIN) | 270 #if defined(WEBRTC_WIN) |
271 WindowsCommandLineArguments::WindowsCommandLineArguments() { | 271 WindowsCommandLineArguments::WindowsCommandLineArguments() { |
(...skipping 20 matching lines...) Expand all Loading... |
292 // need to free each string in the array, and then the array. | 292 // need to free each string in the array, and then the array. |
293 for(int i = 0; i < argc_; i++) { | 293 for(int i = 0; i < argc_; i++) { |
294 delete[] argv_[i]; | 294 delete[] argv_[i]; |
295 } | 295 } |
296 | 296 |
297 delete[] argv_; | 297 delete[] argv_; |
298 } | 298 } |
299 #endif // WEBRTC_WIN | 299 #endif // WEBRTC_WIN |
300 | 300 |
301 } // namespace rtc | 301 } // namespace rtc |
OLD | NEW |