summaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/support')
-rw-r--r--src/support/command-line.cpp8
-rw-r--r--src/support/command-line.h2
2 files changed, 4 insertions, 6 deletions
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() {}
diff --git a/src/support/command-line.h b/src/support/command-line.h
index 6e0af846e..7c3ae528f 100644
--- a/src/support/command-line.h
+++ b/src/support/command-line.h
@@ -37,7 +37,7 @@ class Options {
typedef std::function<void(Options *, const std::string &)> Action;
enum class Arguments { Zero, One, N, Optional };
- int debug;
+ bool debug;
std::map<std::string, std::string> extra;
Options(const std::string &command, const std::string &description);