Reviewers: machenbach,

Description:
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=

Please review this at https://codereview.chromium.org/22851009/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/flags.cc


Index: src/flags.cc
diff --git a/src/flags.cc b/src/flags.cc
index 855e20712c624bb68fbebae83e91952c5b929f6f..542bc016ad9b3f6d5b1c39733499d18f8038c1b6 100644
--- a/src/flags.cc
+++ b/src/flags.cc
@@ -295,6 +295,7 @@ static void SplitArgument(const char* arg,
     }
     if (arg[0] == 'n' && arg[1] == 'o') {
       arg += 2;  // remove "no"
+      if (arg[0] == '-') arg++;  // remove optional dash after "no".
       *is_bool = true;
     }
     *name = arg;


--
--
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.

Reply via email to