From 72c5e955d27436d9a6dae4191f6cc6a52676438e Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Fri, 18 Mar 2016 12:40:10 -0700 Subject: Make --debug a boolean As discussed in #248. --- src/support/command-line.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/support/command-line.cpp') diff --git a/src/support/command-line.cpp b/src/support/command-line.cpp index b4f8a4d62..f3aa4dc08 100644 --- a/src/support/command-line.cpp +++ b/src/support/command-line.cpp @@ -19,7 +19,7 @@ using namespace wasm; Options::Options(const std::string &command, const std::string &description) - : debug(0), positional(Arguments::Zero) { + : debug(false), positional(Arguments::Zero) { add("--help", "-h", "Show this help message and exit", Arguments::Zero, [this, command, description](Options *o, const std::string &) { std::cerr << command; @@ -41,10 +41,8 @@ Options::Options(const std::string &command, const std::string &description) std::cerr << '\n'; exit(EXIT_SUCCESS); }); - add("--debug", "-d", "Print debug information to stderr", Arguments::Optional, - [](Options *o, const std::string &arguments) { - o->debug = arguments.size() ? std::stoi(arguments) : 1; - }); + add("--debug", "-d", "Print debug information to stderr", Arguments::Zero, + [](Options *o, const std::string &arguments) {}); } Options::~Options() {} -- cgit v1.2.3