Revision: 16261
Author: [email protected]
Date: Wed Aug 21 15:17:23 2013 UTC
Log: Allow both "--no<flag>" and "--no-<flag>" to disable <flag>.
We shouldn't need to know whether to use --no or --no- as prefix.
The latter is more intuitive and also what chromium uses.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/22851009
http://code.google.com/p/v8/source/detail?r=16261
Modified:
/branches/bleeding_edge/src/flags.cc
=======================================
--- /branches/bleeding_edge/src/flags.cc Fri Jun 28 15:34:48 2013 UTC
+++ /branches/bleeding_edge/src/flags.cc Wed Aug 21 15:17:23 2013 UTC
@@ -266,6 +266,11 @@
}
return args;
}
+
+
+inline char NormalizeChar(char ch) {
+ return ch == '_' ? '-' : ch;
+}
// Helper function to parse flags: Takes an argument arg and splits it into
@@ -295,6 +300,7 @@
}
if (arg[0] == 'n' && arg[1] == 'o') {
arg += 2; // remove "no"
+ if (NormalizeChar(arg[0]) == '-') arg++; // remove dash after "no".
*is_bool = true;
}
*name = arg;
@@ -316,11 +322,6 @@
}
}
}
-
-
-inline char NormalizeChar(char ch) {
- return ch == '_' ? '-' : ch;
-}
static bool EqualNames(const char* a, const char* b) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.