Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1263)

Unified Diff: webrtc/rtc_base/flags.cc

Issue 3004363002: Use flag name without 'no' prefix only if it exists (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/flags.cc
diff --git a/webrtc/rtc_base/flags.cc b/webrtc/rtc_base/flags.cc
index a245cecf1d4f9ef5aa38e4e159684a03e84809dd..b5697f162feb4da4a7255c6a86be981b35a94b58 100644
--- a/webrtc/rtc_base/flags.cc
+++ b/webrtc/rtc_base/flags.cc
@@ -149,7 +149,7 @@ void FlagList::SplitArgument(const char* arg,
arg++; // remove 1st '-'
if (*arg == '-')
arg++; // remove 2nd '-'
- if (arg[0] == 'n' && arg[1] == 'o') {
+ if (arg[0] == 'n' && arg[1] == 'o' && Lookup(arg + 2)) {
arg += 2; // remove "no"
*is_bool = true;
}
kwiberg-webrtc 2017/09/04 23:30:39 Wait... what? Do we just *ignore* the "no" prefix?
oprypin_webrtc 2017/09/05 06:54:16 Yeah that also threw me off. This variable is more
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698